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; }
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; }
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; }
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); }