Пример #1
0
        public void T13CheckForNoBingo()
        {
            Bingo bingo = new Bingo(20);

            bingo.CheckForBingo();
            Assert.True(bingo.status == "playing");
        }
Пример #2
0
        public void T12CheckForBingo()
        {
            Bingo bingo1 = new Bingo(20);

            for (int r = 0; r < 5; r++)
            {
                //Sets the row to chipped
                for (int c = 0; c < 5; c++)
                {
                    bingo1.bingoCard.card[r][c] = 0;
                }
                Assert.True(bingo1.bingoCard.CheckRows());
            }
            bingo1.CheckForBingo();
            Assert.True(bingo1.status == "win");

            Bingo bingo2 = new Bingo(20);

            for (int c = 0; c < 5; c++)
            {
                //Sets the collumn to chipped
                for (int r = 0; r < 5; r++)
                {
                    bingo2.bingoCard.card[r][c] = 0;
                }
                Assert.True(bingo2.bingoCard.CheckCollumn());
            }
            bingo2.CheckForBingo();
            Assert.True(bingo2.status == "win");

            Bingo bingo3 = new Bingo(20);

            for (int i = 0; i < 5; i++)
            {
                bingo3.bingoCard.card[i][i] = 0;
            }
            Assert.True(bingo3.bingoCard.CheckDiagonals());
            bingo3.CheckForBingo();
            Assert.True(bingo3.status == "win");
        }