Example #1
0
        public ShootResult Shoot(string shooterName, string coordinate)
        {
            var coord = Coordinate.Create(coordinate);

            _gameValidator.ValidateShoot(Players, shooterName, _lastShooterName);

            var result = ShootToPlayer(GetPlayerOpponent(shooterName), coord);

            _lastShooterName = shooterName;

            return(result);
        }
Example #2
0
 public void PlayerIsAllowedToShoot()
 {
     Assert.DoesNotThrow(
         () => _gameValidator.ValidateShoot(_players, Player1, Player1),
         "Player should be allowed to shoot");
 }