public bool ConcludeBet(User user, Outcome outcome) { if (Judge == user && Outcomes.Contains(outcome)) { Result = outcome; Payout(); return(true); } return(false); }
public bool joinBet(User user, Outcome outcome) { if (!Outcomes.Contains(outcome)) //todo needs to check the uses in Lobby { return(false); } user.Balance = -BuyIn; outcome.Participants.Add(user); return(true); }
/// <summary> /// Determines whether this instance contains the specified outcome. /// </summary> /// <param name="outcome">The outcome.</param> /// <returns> /// <c>true</c> if this instance contains the specified outcome; otherwise, <c>false</c>. /// </returns> public bool Contains(int outcome) { return(Outcomes.Contains <int>(outcome)); }