Exemple #1
0
        private static void T_FinishedMatch(object sender, giMyMatchData.Args.WinnerEventArgs e)
        {
            Console.Clear();
            MyMatch m = (MyMatch)sender;

            DisplayMatch.Display(m, null, null, e.winnerId);
            Console.WriteLine($"\n\nThe match has finished! The winner is {m[e.winnerId]} ! Congrats! \n\n");
        }
Exemple #2
0
        private static void T_FinishedPoint(object sender, giMyMatchData.Args.WinnerEventArgs e)
        {
            Console.Clear();
            MyMatch m = (MyMatch)sender;

            DisplayMatch.Display(m, e.winnerId, null, e.winnerId);
            Console.WriteLine($"\nA point has been made, the point maker is {m[e.winnerId]}\n");
        }
Exemple #3
0
        private static void T_FinishedSet(object sender, giMyMatchData.Args.WinnerEventArgs e)
        {
            Console.Clear();
            MyMatch m = (MyMatch)sender;

            DisplayMatch.Display(m, null, null, e.winnerId);
            Console.WriteLine($"\nA set has finished, the set winner is {m[e.winnerId]}\n");
        }
Exemple #4
0
        private static void T_NewMatchCreated(object sender, MyMatch e)
        {
            Console.WriteLine("\nA match has been created \n" + e + "\n");
            DisplayMatch.Display(e);
            //COMMENT S'ABBONNER AU MATCH? LE CODE EN BAS NE LE FAIT PAS CORRECTEMENT! ON S'ABONNE A UNE RÉFERENCE EXTERNE, PAS AU MATCH DEDANS LE TOURNOI!
            //Tournament t = sender as Tournament;
            //MyMatch m = (MyMatch) t.GetMatch(e.Joueurs[0], e.Joueurs[1]);
            //m.FinishedGame += T_FinishedGame;
            //m.FinishedMatch += T_FinishedGame;
            //m.FinishedPoint += T_FinishedPoint;
            //m.FinishedSet += T_FinishedSet;

            e.FinishedGame  += T_FinishedGame;
            e.FinishedMatch += T_FinishedMatch;
            e.FinishedPoint += T_FinishedPoint;
            e.FinishedSet   += T_FinishedSet;
            Thread.Sleep(1000);
        }