Exemple #1
0
        private void ShowCards(ClientGamePhase currentRound)
        {
            switch (currentRound)
            {
            case ClientGamePhase.ShowFlop:
                _game.Flop();
                break;

            case ClientGamePhase.ShowTurn:
                _game.Turn();
                break;

            case ClientGamePhase.ShowRiver:
                _game.River();
                break;

            default:
                throw new Exception($"Can't show cards on that game phase: ({currentRound.ToString()})");
            }
            // TODO: Refactor this, copy pasted from client code
            Console.WriteLine("Community Cards: " + string.Join(' ', _game.ShownCommunityCards));
            ResetBets();
            SendClientsGameState(currentRound);
        }
Exemple #2
0
 public void Write(ClientGamePhase input)
 {
     ConsoleService.LogDebug($"Writing GamePhase ({input.ToString()})");
     _binaryWriter.Write((int)input);
 }