Merge pull request #6568 from johnmeat/ComputerDefaultName

Default unique name for AI.
This commit is contained in:
LevelX2 2020-05-26 23:00:26 +02:00 committed by GitHub
commit 1deb1106b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -126,7 +126,9 @@ public class TablePlayerPanel extends javax.swing.JPanel {
private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed private void cbPlayerTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbPlayerTypeActionPerformed
if (getPlayerType() != PlayerType.HUMAN) { if (getPlayerType() != PlayerType.HUMAN) {
this.newPlayerPanel.setVisible(true); this.newPlayerPanel.setVisible(true);
} else { this.newPlayerPanel.setPlayerName("Computer " + this.lblPlayerNum.getText().charAt(this.lblPlayerNum.getText().length() - 1));
}
else {
this.newPlayerPanel.setVisible(false); this.newPlayerPanel.setVisible(false);
} }
this.revalidate(); this.revalidate();