Beispiel #1
0
        public BettingRound(Pot pot, Positions positions)
        {
            Pot = pot;

            Positions = positions;

            PotContest();

            CurrentTurn = new Turn(Positions.UnderTheGun);
        }
Beispiel #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);
        }