public bool DidShipSurviveRound(Ship ship, int round) { foreach (BattleEvent salvo in Salvos.Take(round)) { if (salvo.Target == ship && salvo.TargetDestroyed) { return(false); } } return(true); }
public int GetEnemyStrengthAfterRound(int round) { // NOTE - may not be entirely accurate as ships shrink when they take damage! var salvos = Salvos.Take(round).ToArray(); int str = 0; foreach (var ship in EnemyShips) { if (DidShipSurviveRound(ship, round)) { str += ship.Size; } } return(str); }