static public void Main() { int height = 20; int width = 40; Lifegame lifegame = new Lifegame(height, width); lifegame.Loop(); }
public void UpdateTest_Blinker() { // 以下のような配置 //□□□ □■□ //■■■ => □■□ //□□□ □■□ int size = 3; Position[] livingCells = new Position[] { new Position(new [] { 1, 0 }), new Position(new [] { 1, 1 }), new Position(new [] { 1, 2 }) }; Lifegame target = new Lifegame(size, livingCells); string expected = "\r\n□■□\r\n□■□\r\n□■□"; string actual; target.Update(); actual = target.ToString(); Assert.AreEqual(expected, actual); }