Exemple #1
0
 private void LuncheGame(object sender, EventArgs e)
 {
     if (GetNumPlayerPresent() == _room.Players.Count())
     {
         socket.Off("hostCheck");
         socket.Off("updateRoom");
         socket.Off("playerLeaveRoom");
         socket.Emit("lunchGame", JObject.Parse(JsonConvert.SerializeObject(_room)));
         GamePage gamePage = new GamePage(_room, _player);
         Application.Current.MainPage.Navigation.PopToRootAsync();
         Application.Current.MainPage.Navigation.PushAsync(gamePage);
     }
     else
     {
         DisplayMessage("Il reste encore des places libre");
     }
 }