public void SetAction(ActionType type, int amount) { currentPendingAction = null; var gameAction = new GameActionEntity() { ActionType = type, Amount = amount, PlayerId = currentHumanPlayer.Id }; currentPlayerAction = gameAction; }
private GameActionEntity Player_ActionRequired(HeadsupGame game, List <ActionType> possibleActions, int amountToCall) { currentPendingAction = new PendingAction() { PossibleActions = possibleActions, AmountToCall = amountToCall }; while (currentPlayerAction == null) { Task.Delay(1000); } var playerAction = currentPlayerAction; currentPlayerAction = null; return(playerAction); }