예제 #1
0
        public void SingleShotMissed()
        {
            var singleShotCommand = new FireSingleShotCommand(new Point(5, 5));

            singleShotCommand.PerformCommand(gameMap, player);

            var firstCell = opponentMap.Cells.First(cell => cell.X == 5 && cell.Y == 5);

            Assert.IsTrue(firstCell.Missed);
            Assert.IsTrue(player.Energy == 49);
        }
예제 #2
0
        public void SingleShotHit()
        {
            var singleShotCommand = new FireSingleShotCommand(new Point(0, 0));

            singleShotCommand.PerformCommand(gameMap, player);

            var firstCell = opponentMap.Cells.First(cell => cell.X == 0 && cell.Y == 0);

            Assert.IsTrue(firstCell.Damaged);
            Assert.IsTrue(player.Energy == 49);
        }