public void RecieveAction(Actions.ActionOrder Ac) { if (Ac.Action.CheckValidity(Ac.Performer, Ac.Selection, TurnInformation)) { Ac.Action.Execute(Ac.Performer, Ac.Selection, TheCardGameState); } }
// This assumes the action is valid, it will not check! private static float EvaluateAction(int playerIndex, Actions.ActionOrder action, CardGameState gameState, int roundVictoryLimit) { Actions.ActionOrder actionCopy = action; CardGameState stateCopy = gameState; // We assume this is a valid action otherwise this action should never have been made available. actionCopy.Action.Execute(actionCopy.Performer, actionCopy.Selection, stateCopy); Player thisPlayerCopy = stateCopy.Players[playerIndex]; // Check whether this action (or preceding actions this turn) allows us not to pass this turn. bool stillPassing = !(thisPlayerCopy.HasSpentCP() || thisPlayerCopy.WasCardPlaced()); return(EvaluateMatchWinChance(playerIndex, stateCopy, roundVictoryLimit, stillPassing)); }
public void PassAction(Actions.ActionOrder Ac) { TheTurnManager.RecieveAction(Ac); }