public void MakeBet(Match match, int homeTeamGoals, int awayTeamGoals) { if (match == null) throw new ArgumentNullException("match"); Bets.Add(new Bet(this, match, homeTeamGoals, awayTeamGoals)); }
static void Main(string[] args) { User user = new User("wrparra"); Tournament tournament = new Tournament("Copa América 2011"); tournament.SubscribeUser(user); Console.WriteLine(tournament); foreach (var userSubscribed in tournament.SubscribedUsers) { Console.WriteLine(user); } Match match = new Match() { HomeTeam = new Team("Brasil"), AwayTeam = new Team("Argentina") }; Console.WriteLine(match); match.SetScore(2, 1); Console.WriteLine(match); Console.Read(); }
public Bet(User user, Match match, int homeTeamGoals, int awayTeamGoals) { this.User = user; this.Match = match; this.HomeTeamGoals = homeTeamGoals; this.AwayTeamGoals = awayTeamGoals; this.IsValid = true; }
public MatchScore(Match match, int homeGoals, int awayGoals) { this._match = match; this.HomeGoals = homeGoals; this.AwayGoals = awayGoals; }