void UpdateRound() { switch (CurrentRoundStep) { case RoundStep.PowerGeneration: // TODO: Show animation for player ship generating power? if (PlayerShip != null) { PlayerShip.GeneratePower(); } foreach (var ship in NPCShips) { ship.GeneratePower(); } CurrentPhaseStep = PhaseStep.ShipMovement; CurrentRoundStep = RoundStep.PhaseOne; break; case RoundStep.PhaseOne: case RoundStep.PhaseTwo: case RoundStep.PhaseThree: case RoundStep.PhaseFour: case RoundStep.PhaseFive: case RoundStep.PhaseSix: UpdatePhase(); break; case RoundStep.Bookkeeping: if (PlayerShip != null) { PlayerShip.EndRound(); } foreach (var ship in NPCShips) { ship.EndRound(); } EndMissionState ended = CheckEndOfMission(); if (ended != EndMissionState.MissionInProgress) { // TODO: mission is complete, so resolve mission CurrentMissionState = MissionState.EndOfMission; } else { CurrentRound++; CurrentRoundStep = RoundStep.PowerGeneration; } break; } }
protected PhaseBase(IGame game, PhaseCode code, PhaseStep stepCode) : base(game) { this.code = code; this.stepCode = stepCode; }