Exemple #1
0
 private Game()
 {
     board      = new Board(gameLocation);
     dispatcher = QuoridorEventDispatcher.getInstance();
     //dispatcher.OnMove += OpponentMove;
     quoridorWebService = dispatcher.QuoridorWebService;
     _players           = new List <QuoridorPlayer>();
 }
Exemple #2
0
 public LogInPage()
 {
     InitializeComponent();
     _dispatcher = QuoridorEventDispatcher.getInstance();
     if (!_dispatcher.IsRunning())
     {
         _dispatcher.Start();
     }
     _dispatcher.LoggedIn += _dispatcher_LoggedIn;
 }
Exemple #3
0
        public AvailableUsersListPage()
        {
            InitializeComponent();
            _dispatcher        = QuoridorEventDispatcher.getInstance();
            quoridorWebService = _dispatcher.QuoridorWebService;
//            var task = DeserializeInvitations().Result;

            _dispatcher.AddRequest(new EventRequest {
                RequestType = EventRequestType.CheckAwaitingInvitation
            });
            _dispatcher.AddRequest(new EventRequest {
                RequestType = EventRequestType.GetLoggedUsers
            });

            if (_myInvitations.Count > 0)
            {
                _dispatcher.AddRequest(new EventRequest {
                    RequestType = EventRequestType.CheckAcceptedInvitation, RequestObject = _myInvitations.FirstOrDefault()
                });
            }
        }
 public void Setup()
 {
     _sut = QuoridorEventDispatcher.getInstance();
     _sut.Start();
 }