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

            menuContent.Children.Add(lanGameLobbyControl);
        }
Exemple #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;
        }
Exemple #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);
     }
 }
Exemple #4
0
 public override void NewGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl) =>
 NewLocalGame(lanGameSession, lanGameLobbyControl);
Exemple #5
0
 protected abstract void NewLocalGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl);
Exemple #6
0
 public abstract void NewGame(LanGameSession lanGameSession, LanGameLobbyControl lanGameLobbyControl);