Exemplo n.º 1
0
        private void NewLocalGameBtn_Click(object sender, RoutedEventArgs e)
        {
            menuContent.Children.Clear();
            var lanGameLobbyControl = new LanGameLobbyControl(this);

            menuContent.Children.Add(lanGameLobbyControl);
        }
Exemplo n.º 2
0
        private async void AnotherPlayerDisconnected()
        {
            if (lanGameSession.IsGameStarted)
            {
                MessageBox.Show("К сожалению, другой игрок покинул игру :(", "Игра завершена", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            PrepareForNewGame();
            lanGameLobbyControl.ShowMainMenu();
            await lanGameSession.DisconnectAsync();

            lanGameSession      = null;
            lanGameLobbyControl = null;
        }
Exemplo n.º 3
0
 protected override void NewLocalGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl)
 {
     NewSingleGame();
     this.gameType            = GameType.Local;
     this.lanGameLobbyControl = lanGameLobbyControl;
     this.lanGameSession      = lanGameSession;
     whiteIsMyColor           = lanGameSession.IsServer;
     if (!lanGameSession.IsServer)
     {
         GetLocalGameStep();
         Rotate(180);
     }
     else
     {
         Rotate(0);
     }
 }
Exemplo n.º 4
0
 public override void NewGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl) =>
 NewLocalGame(lanGameSession, lanGameLobbyControl);
Exemplo n.º 5
0
 protected abstract void NewLocalGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl);
Exemplo n.º 6
0
 public abstract void NewGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl);