public void AttackEmptyLocation() { Setup(); AttackResult result = _location.Attack(); Assert.AreEqual(AttackResult.Miss, result); TearDown(); }
public static AttackResult Attack(IArrayBoardObject board, Position attackLocation) { ILocation targetLocation = GetLocationOnArrayBoard.GetLocation(board, attackLocation); try { return(targetLocation.Attack()); } catch (LocationAlreadyAttackedException) { throw new PositionAlreadyAttackedException(string.Format("Position {0} has already been attacked previously.", targetLocation.GetPositionId())); } }