Exemple #1
0
        public void AndTheBoardIsFilledThenTrueIsReturned()
        {
            var board = new BoardBuilder().Create();

            for (var i = 0; i < board.Dimension; i++)
            {
                for (var j = 0; j < board.Dimension; j++)
                {
                    board.FillLocation('x', i, j);
                }
            }
            Console.WriteLine(board);
            Assert.IsTrue(GameCondition.IsBoardFilled('-', board));
        }
Exemple #2
0
        public void AndTheBoardHasAnUpperRightDiagonalFilledThenTrueIsReturned()
        {
            var board = new BoardBuilder().Fill('x', 0, 2).Fill('x', 1, 1).Fill('x', 2, 0).Create();

            Assert.IsTrue(GameCondition.AllInADiagonal('x', board));
        }
Exemple #3
0
        public void AndTheBoardHasAllInARowThenTrueIsReturned()
        {
            var board = new BoardBuilder().Fill('x', 0, 0).Fill('x', 0, 1).Fill('x', 0, 2).Create();

            Assert.IsTrue(GameCondition.AllInARow('x', board));
        }