public int? MakeADecision(GameState gameState) { //csak, ha már vannak terített lapok if (gameState.CommunityCards.FirstOrDefault() == null) return null; //Van-e magasabb lapom a flopnál? bool IsHigherThanFlop = false; Rank flopMax = Rank.Number2; foreach (Card flop in gameState.CommunityCards) { if (flop.Rank > flopMax) flopMax = flop.Rank; } foreach (Card own in gameState.Players.ElementAt(gameState.InAction).HoleCards) { if (own.Rank > flopMax) { IsHigherThanFlop = true; break; } } //sosem játszik, nem tartozik még hozzá logika if (IsHigherThanFlop == true) return 200; else return null; }
public static int GetCallAmount(GameState gameState) { return gameState.current_buy_in - gameState.players[gameState.in_action].bet; }
private static int GetRaiseAmount(GameState gameState) { return gameState.current_buy_in - gameState.players[gameState.in_action].bet + gameState.minimum_raise; }
public static int GetAllInAmount(GameState gameState) { return gameState.players[gameState.in_action].stack; }