public void ReportInstructions(RoundReport currentReport) { if (currentReport == null) { throw new ArgumentNullException("currentReport"); } Diagnostics.Assert(this.reportInstructions != null); for (int i = 0; i < this.reportInstructions.Count; i++) { IContenderReportInstruction contenderReportInstruction = this.reportInstructions[i]; Diagnostics.Assert(contenderReportInstruction != null); currentReport.ReportInstruction(this.ContenderGUID, contenderReportInstruction); } this.reportInstructions.Clear(); }
public void ReportInstruction(IContenderReportInstruction reportInstruction) { if (reportInstruction == null) { throw new ArgumentNullException("reportInstruction"); } Diagnostics.Assert(this.reportInstructions != null); BattleTargetingStrategyChangeInstruction battleTargetingStrategyChangeInstruction = reportInstruction as BattleTargetingStrategyChangeInstruction; if (battleTargetingStrategyChangeInstruction != null) { this.reportInstructions.RemoveAll((IContenderReportInstruction instruction) => instruction is BattleTargetingStrategyChangeInstruction); } BattleReinforcementPriorityChangeInstruction battleReinforcementPriorityChangeInstruction = reportInstruction as BattleReinforcementPriorityChangeInstruction; if (battleReinforcementPriorityChangeInstruction != null) { this.reportInstructions.RemoveAll((IContenderReportInstruction instruction) => instruction is BattleReinforcementPriorityChangeInstruction); } this.reportInstructions.Add(reportInstruction); }