C# Класс Minesweeper.Data_Access_Layer.RowMajorFileSerializer

An implementation of the IMinesweeperSerializer interface. IMinefields are loaded from a file path. Each line in the file contains a unique minefield. Minefields are in the following format: row,col;data row = number of rows in the minefield matrix col = number of columns in the minefield matrix data = a list of '*' and '.' characters. '*' indicates a mine cell, '.' indicates a clear cell. Cells are sorted in row major order.
Наследование: IMinesweeperSerializer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Load ( ) : IEnumerable
RowMajorFileSerializer ( string path ) : System
Save ( IEnumerable fields ) : void

Приватные методы

Метод Описание
HasMine ( char data ) : bool
PrintArea ( IMineArea area ) : string

Описание методов

Load() публичный Метод

public Load ( ) : IEnumerable
Результат IEnumerable

RowMajorFileSerializer() публичный Метод

public RowMajorFileSerializer ( string path ) : System
path string
Результат System

Save() публичный Метод

public Save ( IEnumerable fields ) : void
fields IEnumerable
Результат void