Esempio n. 1
0
        public BettingRound(Pot pot, Positions positions)
        {
            Pot = pot;

            Positions = positions;

            PotContest();

            CurrentTurn = new Turn(Positions.UnderTheGun);
        }
Esempio n. 2
0
        public void PlaceAction(Action action)
        {
            if (Pot.HasWinner())
            {
                throw new EndOfRoundException();
            }
            if (CurrentTurn.Position != action.PlayerPosition)
            {
                throw new OutOfTurnException();
            }
            if (action.IsFold())
            {
                Pot.Leave(action.PlayerPosition.Player);
            }

            CurrentTurn = new Turn(CurrentTurn.Position.NextPosition);
        }