public WinResponse Spin(Cash bet) { if (bet.Count > Cash.Count) { throw new NotEnoughMoneyException(); } if (bet.Count < MinAwaibleBet.Count || bet.Count > MaxAwaibleBet.Count) { throw new NotAwaibleBetException(); } Cash.Count -= bet.Count; GameField.GenerateSigns(); var winValidator = WinValidators.CheckWin(GameField); Cash.Count += bet.Count * winValidator.Multiplier; var winResponse = new WinResponse(winValidator.Name, bet, winValidator.Multiplier); HistoryOfSpins.Add(winResponse); return(winResponse); }
public bool Equals(WinResponse response) { return(response.Name == this.Name && response.Multiplier == this.Multiplier); }