private void ConfirmNames(object sender, RoutedEventArgs e) { Game mygame = new Game(numValue); List<Player> players = mygame.getPlayers(); for (int i = 0; i < numValue; i++) { players[i].setName(nameBox[i].Text); } main = new MainWindow(mygame,language); PrepScreen Prep = new PrepScreen(players[0].getName(), main); Prep.Show(); Close(); }
private void End_Turn_Click(object sender, RoutedEventArgs e) { player.cleanUp(); this.Hide(); Todo.Text = ""; PrepScreen prep = new PrepScreen(myGame.nextPlayerName(), this); prep.Show(); player = myGame.nextTurnPlayer(); actiondone = ""; phase = "Action Phase"; Player_Label.Content = player.getName() + "'s"; Phase_Label.Content = phase; End_Phase.IsEnabled = true; player.getCurrency(); ResetHilightedCards(); Turn_Label.Content = myGame.getTurnsPassed(); RefreshWindow(); StatusObject status = player.callDelayedFunctions(); RefreshWindow(); Todo.Text = status.getMessage(); if (status.wasMilitiaPlayed()) { militia(); return; } }
private void Load_Game(object sender, RoutedEventArgs e) { Game mygame = Game.Load(); if (mygame != null) { List<Player> players = mygame.getPlayers(); main = new MainWindow(mygame, language); PrepScreen Prep = new PrepScreen(mygame.getCurrentPlayer().getName(), main); Prep.Show(); Close(); } }