public void CloseBetBeforeEnd(object sender, EndOfPartEventArgs args) { if (sender == this.Match && !this.BetClosed && ((args.GamesAway > args.GamesHome && this.BetOnResult == DrawNotPossibleResults.WinAway) || (args.GamesHome > args.GamesAway && this.BetOnResult == DrawNotPossibleResults.WinHome))) { this.AmountWon = (this.Match.Coefficients[(int)this.BetOnResult] - 1) * this.BetAmnout / 2; this.BetClosed = true; Console.WriteLine("The bet({0}) for ({1}) has been closed before the end of match with {2:C} win above the bet amount({3:C})!", this.ID, this.Match.ID, this.AmountWon, this.BetAmnout); } }
static void PrintScoreEvent(object sender, EndOfPartEventArgs args) { Console.WriteLine("team {0} has won game#{1}. The result in the game is [{2}:{3}]", args.Team, args.PassedGames, args.ScoredHome, args.ScoredAway); }