private void Log_reader_ActionStart(object sender, LogParser.ActionStartEventArgs e) { if (e.block_type == "TRIGGER") return; if (e.block_type == "POWER") return; if (e.block_type == "DEATHS") return; var game_stage = this.GetGameStage(e.game); if (game_stage != GameStage.STAGE_PLAYER_CHOICE && game_stage != GameStage.STAGE_OPPONENT_CHOICE) { this.AddLog("!!!!!!!!!!!!!!!!!!!!!! Game stage is not a choice stage in action start callback !!!!!!!!!!!!!!"); return; } this.TriggerAIHandleBoardAction(e.game); }
private void CreateLogParser() { this.log_parser = new LogParser(this.frmMain); this.log_parser.GameState.StartWaitingMainAction += (sender, e) => { if (this.StartWaitingMainAction != null) this.StartWaitingMainAction(this, e); }; this.log_parser.ActionStart += (sender, e) => { if (this.ActionStart != null) this.ActionStart(this, e); }; this.log_parser.CreateGameEvent += (sender, e) => { if (this.CreateGameEvent != null) this.CreateGameEvent(this, e); }; this.log_parser.EndTurnEvent += (sender, e) => { if (this.EndTurnEvent != null) this.EndTurnEvent(this, e); }; }
private void Log_reader_EndTurnEvent(object sender, LogParser.EndTurnEventArgs e) { this.TriggerAIHandleBoardAction(e.game); }