public void ChangeKaijuEmpireAIState(AIPlayer.PlayerState newState) { if (this.Released) { return; } if (this.aiPlayerKaijuEmpire != null) { this.aiPlayerKaijuEmpire.ChangeAIState(newState); } }
public void ChangeMajorEmpireAIState(Empire empire, AIPlayer.PlayerState newState) { if (empire == null) { throw new ArgumentNullException("empire"); } if (this.Released) { return; } Diagnostics.Assert(this.aiPlayerMajorEmpires != null); AIPlayer aiplayer = this.aiPlayerMajorEmpires.Find((AIPlayer_MajorEmpire ai) => ai.MajorEmpire.Index == empire.Index); if (aiplayer != null) { aiplayer.ChangeAIState(newState); } }
public bool TryGetMajorEmpireAIState(Empire empire, out AIPlayer.PlayerState state) { if (empire == null) { throw new ArgumentNullException("empire"); } if (this.Released) { state = AIPlayer.PlayerState.Deactivated; return(false); } Diagnostics.Assert(this.aiPlayerMajorEmpires != null); AIPlayer aiplayer = this.aiPlayerMajorEmpires.Find((AIPlayer_MajorEmpire ai) => ai.MajorEmpire.Index == empire.Index); if (aiplayer != null) { state = aiplayer.AIState; return(true); } state = AIPlayer.PlayerState.Deactivated; return(false); }