Ejemplo n.º 1
0
        public void ToadTest()
        {
            var seed = new StringBuilder();

            seed.AppendLine("------");
            seed.AppendLine("------");
            seed.AppendLine("--111-");
            seed.AppendLine("-111--");
            seed.AppendLine("------");
            seed.AppendLine("------");
            var board = new GameBoard(seed.ToString());

            board.Cycle();

            var expected = new StringBuilder();

            expected.AppendLine("------");
            expected.AppendLine("---1--");
            expected.AppendLine("-1--1-");
            expected.AppendLine("-1--1-");
            expected.AppendLine("--1---");
            expected.AppendLine("------");

            board.GetPrintout().Should().Be(expected.ToString().TrimEnd());
        }
Ejemplo n.º 2
0
        public void CanCreateGameBoardWithSimpleSeed()
        {
            var board = new GameBoard("0");

            board.GetPrintout().Should().Be("-");
        }