private void spnNumWinsnumPlayersChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spnNumWinsnumPlayersChanged
// TODO add your handling code here:
}//GEN-LAST:event_spnNumWinsnumPlayersChanged
private void setGameOptions() {
GameTypeView gameType = (GameTypeView) cbGameType.getSelectedItem();
int oldValue = (Integer) this.spnNumPlayers.getValue();
this.spnNumPlayers.setModel(new SpinnerNumberModel(gameType.getMinPlayers(), gameType.getMinPlayers(), gameType.getMaxPlayers(), 1));
this.spnNumPlayers.setEnabled(gameType.getMinPlayers() != gameType.getMaxPlayers());
if (oldValue >= gameType.getMinPlayers() && oldValue <= gameType.getMaxPlayers()){
this.spnNumPlayers.setValue(oldValue);
}
this.cbAttackOption.setEnabled(gameType.isUseAttackOption());
this.cbRange.setEnabled(gameType.isUseRange());
createPlayers((Integer) spnNumPlayers.getValue() - 1);
}