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

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