public void CheckLivesAfterDamageOfTwoMastShip()
        {
            TwoMastShip twoMastShip = new TwoMastShip();

            (twoMastShip).Damage();
            Assert.AreEqual(1, (twoMastShip).Lives);
        }
        public void CheckDamageStateOfTwoMastShip()
        {
            TwoMastShip twoMastShip = new TwoMastShip();

            (twoMastShip).Damage();
            Assert.AreEqual(Ship.State.Damaged, (twoMastShip).Status);
        }
示例#3
0
        public void ResultOfHitTwoMastShip()
        {
            TwoMastShip    twoMastShip    = new TwoMastShip();
            ShipBoardField shipBoardField = new ShipBoardField(twoMastShip);

            Assert.AreEqual(Shot.Result.Damaged, shipBoardField.Shoot());
        }
示例#4
0
        public void CheckLocateTwoShipsOnBoard()
        {
            BoardConfig boardConfig = new BoardConfig
            {
                RowsNumber    = 6,
                ColumnsNumber = 6
            };
            Board       board       = new Board(boardConfig);
            TwoMastShip twoMastShip = new TwoMastShip();
            OneMastShip oneMastShip = new OneMastShip();

            board.LocateShip(twoMastShip);
            board.LocateShip(oneMastShip);
            Assert.AreEqual(2, board.ShipsOnBoard);
        }