コード例 #1
0
ファイル: ConsoleTestScene.cs プロジェクト: appastoy/CodeKata
 public void Release()
 {
     streamParser = null;
     gridParser   = null;
     if (gridDrawer != null)
     {
         gridDrawer.Dispose();
         gridDrawer = null;
     }
 }
コード例 #2
0
ファイル: ConsoleTestScene.cs プロジェクト: appastoy/CodeKata
 public void Initialize()
 {
     streamParser = new StreamParser(new char[] { '.', 'B', 'W' });
     gridParser   = new GridParser <CellColor>(new Dictionary <char, CellColor>()
     {
         { '.', CellColor.Blank },
         { 'W', CellColor.White },
         { 'B', CellColor.Black }
     });
     gridDrawer = new GridTextDrawer <CellColor>(Console.Out, new Dictionary <CellColor, char>()
     {
         { CellColor.Blank, '.' },
         { CellColor.White, 'W' },
         { CellColor.Black, 'B' }
     }, '0');
 }
コード例 #3
0
ファイル: Board.cs プロジェクト: thedole/GameOfLife01
 public Board(IGridDrawer drawer, string grid = "")
 {
     _drawer = drawer;
     _cells = CellsFromString(grid);
 }