Exemple #1
0
        public void SeekerMissileMiss()
        {
            var fireSeekerMissileCommand = new FireSeekerMissileCommand(new Point(3, 3));

            fireSeekerMissileCommand.PerformCommand(gameMap, player);

            var middleCell = opponentMap.Cells.First(cell => cell.X == 3 && cell.Y == 3);

            Assert.IsTrue(middleCell.Missed);

            Assert.IsTrue(player.Energy == 14);
        }
Exemple #2
0
        public void SeekerMissileHit()
        {
            var fireSeekerMissileCommand = new FireSeekerMissileCommand(new Point(1, 1));

            fireSeekerMissileCommand.PerformCommand(gameMap, player);

            var cellHit    = opponentMap.Cells.First(cell => cell.X == 0 && cell.Y == 1);
            var cellNotHit = opponentMap.Cells.First(cell => cell.X == 1 && cell.Y == 0);

            Assert.IsTrue(cellHit.Damaged);
            Assert.IsFalse(cellNotHit.Hit);

            Assert.IsTrue(player.Energy == 14);
        }