/// public Window2(Board cg, setPlayers setPlayers) { SetPlayers = setPlayers; CurrentBoard = cg; Name = ""; InitializeComponent(); Plist.ItemsSource = CurrentBoard.getPieceNames(); }
/// <summary> /// this mehtod adds the new players to the game (Player array) /// </summary> public void populatePlayers() { try { setPlayers p = new setPlayers(this); p.ShowDialog(); checkPlayers(); } catch (NotEnoughPlayersException) { MessageBox.Show("Please add at least 2 players"); } }