Esempio n. 1
0
        public StreetBet(double amount, int startNrOfRow) : base(amount, 11)
        {
            if (Pocket.ColumnOfPocket(startNrOfRow) != 1)
            {
                throw new ArgumentException("Not a valid start of a row");
            }

            _startNrOfRow = startNrOfRow;
        }
Esempio n. 2
0
        public CornerBet(double amount, int leftTopCornerNr) : base(amount, 8)
        {
            if (leftTopCornerNr >= 34 || Pocket.ColumnOfPocket(leftTopCornerNr) == 3)
            {
                throw new ArgumentException("Invalid left top corner value");
            }

            _leftTopCornerNr = leftTopCornerNr;
        }
Esempio n. 3
0
        public LineBet(double amount, int startNrOfLine) : base(amount, 5)
        {
            if (Pocket.ColumnOfPocket(startNrOfLine) != 1 && startNrOfLine < 34)
            {
                throw new ArgumentException("Value is not a start of a line");
            }

            _startNrOfLine = startNrOfLine;
        }
Esempio n. 4
0
        public override double CalculateWinnings(Pocket pocket)
        {
            double winnings = 0 - Amount;

            if (pocket.IsZeroOrDoubleZero())
            {
                return(winnings);
            }

            if (CheckIfColumnWasGuessed(_column, Pocket.ColumnOfPocket(pocket.Number)))
            {
                winnings += Amount + Amount * WinningsMultiplier;
            }

            return(winnings);
        }