void PlayOfflineGame() { UserName = StartUpPageVM.PlayerName; WriteToRegistry(); LocalPlayerNr = 0; PlayerNames = new[] { UserName, "Askolds", "Haralds" }; GamePageVM.PlayerName1 = PlayerNames[NextPlayerNr]; GamePageVM.PlayerName2 = PlayerNames[LocalPlayerNr]; GamePageVM.PlayerName3 = PlayerNames[PriorPlayerNr]; PagePoints.SetNames(PlayerNames[0], PlayerNames[1], PlayerNames[2]); MainWindow.Content = GamePage; IsOnlineGame = false; ToClient.PlayOffline(UserName); }
void PlayOfflineGame() { UserName = StartUpPageVM.PlayerName; WriteToRegistry(); LocalPlayerNr = 0; PlayerNames = new[] { UserName, "Askolds", "Haralds" }; GamePageVM.PlayerName1 = PlayerNames[NextPlayerNr]; GamePageVM.PlayerName2 = PlayerNames[LocalPlayerNr]; GamePageVM.PlayerName3 = PlayerNames[PriorPlayerNr]; PointsPageVM.PlayerName1 = PlayerNames[0]; PointsPageVM.PlayerName2 = PlayerNames[1]; PointsPageVM.PlayerName3 = PlayerNames[2]; App.MainPage = GamePage; IsOnlineGame = false; ToClient.PlayOffline(UserName); }