예제 #1
0
        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);
        }
예제 #2
0
        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);
            };
        }
예제 #3
0
 private void Log_reader_EndTurnEvent(object sender, LogParser.EndTurnEventArgs e)
 {
     this.TriggerAIHandleBoardAction(e.game);
 }