private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Tvm = new TournoiViewModel(tournoi);
            TournoiController.DataContext = Tvm;

            MatchPLayerGlobal mpg = new MatchPLayerGlobal(this);
            Dispatcher.BeginInvoke(new Action(mpg.play), DispatcherPriority.ContextIdle);
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Tvm = new TournoiViewModel(tournoi);
            TournoiController.DataContext = Tvm;

            MatchPLayerGlobal mpg = new MatchPLayerGlobal(this);

            Dispatcher.BeginInvoke(new Action(mpg.play), DispatcherPriority.ContextIdle);
        }
Esempio n. 3
0
        /// <summary>
        /// Constructeur.
        /// </summary>
        /// <param name="m">Match à jouer.</param>
        public MatchPlayer(Match m, bool auto, int idJ1, int idJ2, MatchPLayerGlobal mpg)
        {
            _match = m;
            _vainqueur = null;

            Auto = auto;
            IdJ1 = idJ1;
            IdJ2 = idJ2;
            rnd = new Random();

            this.mpg = mpg;
            nb = 0;
            res = -1;
            choix = new int[2];

            if (Auto)
                playAuto();
            else
            {
                playJouable();
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Constructeur.
        /// </summary>
        /// <param name="m">Match à jouer.</param>
        public MatchPlayer(Match m, bool auto, int idJ1, int idJ2, MatchPLayerGlobal mpg)
        {
            _match     = m;
            _vainqueur = null;

            Auto = auto;
            IdJ1 = idJ1;
            IdJ2 = idJ2;
            rnd  = new Random();

            this.mpg = mpg;
            nb       = 0;
            res      = -1;
            choix    = new int[2];

            if (Auto)
            {
                playAuto();
            }
            else
            {
                playJouable();
            }
        }