static void Initialize(Engine engine)
        {
            Sea botSea    = new BootSea(fieldRows, fieldCols);
            Sea playerSea = new PlayerSea(fieldRows, fieldCols);

            engine.ConfigureGameField(botSea as BootSea, shipMaxLength);
            engine.ConfigureGameField(playerSea as PlayerSea, shipMaxLength);
        }
Пример #2
0
        public void GetBodyTest3()
        {
            State[,] testSea = new State[5, 20];

            for (int row = 0; row < testSea.GetLength(0); row++)
            {
                for (int col = 0; col < testSea.GetLength(1); col++)
                {
                    testSea[row, col] = State.Empty;
                }
            }

            BootSea sea = new BootSea(testSea.GetLength(0), testSea.GetLength(1));

            CollectionAssert.AreEqual(sea.GetBody(), testSea);
        }