Ejemplo n.º 1
0
        public void TestGameFieldColCount()
        {
            BaloonsGame popBaloons = new BaloonsGame();
            int         expected   = BaloonsGame.GAME_FIELD_COLS_COUNT;
            int         actual     = popBaloons.GameField.GetLength(1);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void TestGamePopBaloons()
        {
            BaloonsGame popBaloons = new BaloonsGame();

            int[,] gameField = new int[popBaloons.GameField.GetLength(0), popBaloons.GameField.GetLength(1)];
            Array.Copy(popBaloons.GameField, gameField, popBaloons.GameField.Length);
            CollectionAssert.AreEqual(popBaloons.GameField, gameField);

            int row = 0;
            int col = 0;
        }
Ejemplo n.º 3
0
        public void TestGameFieldMaxNumber()
        {
            BaloonsGame popBaloons = new BaloonsGame();
            int         expected   = BaloonsGame.GAME_FIELD_MAX_NUMBER;
            int         actual     = 0;

            for (int row = 0; row < popBaloons.GameField.GetLength(0); row++)
            {
                for (int col = 0; col < popBaloons.GameField.GetLength(1); col++)
                {
                    if (actual < popBaloons.GameField[row, col])
                    {
                        actual = popBaloons.GameField[row, col];
                    }
                }
            }
            Assert.AreEqual(expected, actual);
        }