internal void PlayerDraw(Entity entity) { Console.WriteLine("PlayerDraw " + entity.Card.Name); _randomController.cardsToDraw.Add(entity); if (!_isMulliganPhase) { if (_isNewTurn) { _isNewTurn = false; _game.MainReady(); _game.MainStartTriggers(); _game.MainRessources(); _game.MainDraw(); _game.MainStart(); _game.Step = Step.MAIN_ACTION; } if (!_isProcessingTask) { launchAgent(); } } }
/// <summary>Invokes the method which corresponds to the next simulation step.</summary> /// <param name="game">The game subject.</param> /// <param name="step">The (next) step value.</param> /// <exception cref="ArgumentOutOfRangeException">step - when the provided step is unknown</exception> public void NextStepEvent(Game game, Step step) { game.Log(LogLevel.DEBUG, BlockType.TRIGGER, "Event", !game.Logging? "":$"NextStepEvent - {step}"); switch (step) { case Step.BEGIN_FIRST: game.Step = step; game.BeginFirst(); break; case Step.BEGIN_SHUFFLE: game.Step = step; game.BeginShuffle(); break; case Step.BEGIN_DRAW: game.Step = step; game.BeginDraw(); break; case Step.BEGIN_MULLIGAN: game.Step = step; game.BeginMulligan(); break; case Step.MAIN_BEGIN: game.Step = step; game.MainBegin(); break; case Step.MAIN_DRAW: game.Step = step; game.MainDraw(); break; case Step.MAIN_READY: game.Step = step; game.MainReady(); break; case Step.MAIN_RESOURCE: game.Step = step; game.MainRessources(); break; case Step.MAIN_START: game.Step = step; game.MainStart(); break; case Step.MAIN_START_TRIGGERS: game.Step = step; game.MainStartTriggers(); break; case Step.MAIN_ACTION: game.Step = step; break; case Step.MAIN_COMBAT: break; case Step.MAIN_CLEANUP: game.Step = step; game.MainCleanUp(); break; case Step.MAIN_END: game.Step = step; game.MainEnd(); break; case Step.MAIN_NEXT: game.Step = step; game.MainNext(); break; case Step.FINAL_WRAPUP: game.FinalWrapUp(); break; case Step.FINAL_GAMEOVER: game.FinalGameOver(); break; case Step.INVALID: break; default: throw new ArgumentOutOfRangeException(nameof(step), step, null); } }