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
파일 보기 프로젝트 열기: jaegerpicker/CantonSoftwareMentorship 1 사용 예제들

공개 메소드들

메소드 설명
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