public void PlayerPlaysTurn(PokerActionCode pokerActionCode, int money) { IPokerAction player = ListPlayers[currentPlayerTurnIdx].GetGameType <IPokerAction>(); // ListPlayers[currentPlayerTurnIdx].p switch (pokerActionCode) { case PokerActionCode.CALL: Pot += player.PokerCall(CurrentRaise); break; case PokerActionCode.CHECK: player.PokerCheck(); break; case PokerActionCode.FOLD: player.PokerFold(); break; case PokerActionCode.RAISE: Pot += player.PokerRaise(money); // should take in amount from UI currentGameState = GameState.raised; break; case PokerActionCode.ALLIN: player.PokerAllIn(); currentGameState = GameState.raised; break; } isPlayerDone[currentPlayerTurnIdx] = true; }
private PokerActionCode GameSituationCreater(int MoneyRaise, GameState currentState) { pokerCombo.Money = 1000; object[] args = new object[2] { currentState, MoneyRaise }; PokerActionCode expectedAct = (PokerActionCode)pokerTest.Invoke("MakeDecision", args); return(expectedAct); }