C# Class 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.
Inheritance: IMinesweeperSerializer
Afficher le fichier Open project: jaegerpicker/CantonSoftwareMentorship Class Usage Examples

Méthodes publiques

Méthode Description
Load ( ) : IEnumerable
RowMajorFileSerializer ( string path ) : System
Save ( IEnumerable fields ) : void

Private Methods

Méthode Description
HasMine ( char data ) : bool
PrintArea ( IMineArea area ) : string

Method Details

Load() public méthode

public Load ( ) : IEnumerable
Résultat IEnumerable

RowMajorFileSerializer() public méthode

public RowMajorFileSerializer ( string path ) : System
path string
Résultat System

Save() public méthode

public Save ( IEnumerable fields ) : void
fields IEnumerable
Résultat void