Methods Summary |
---|
long | getCountDown()
return countDown;
|
long | getDelay()
return delay;
|
int | getMaxCards()
return maxCards;
|
int | getMaxPlayers()
return maxPlayers;
|
void | setCountDown(long countDown)
this.countDown = countDown;
saveParameters();
|
protected void | setDefaults(java.util.Properties defaults)
defaults.put(delayName, new Long(delay/ONE_SECOND).toString());
defaults.put(countDownName, new Long(countDown/ONE_SECOND).toString());
defaults.put(maxPlayersName, new Integer(maxPlayers).toString());
defaults.put(maxCardsName, new Integer(maxCards).toString());
|
void | setDelay(long delay)
this.delay = delay;
saveParameters();
|
void | setMaxCards(int maxCards)
this.maxCards = maxCards;
saveParameters();
|
void | setMaxPlayers(int maxPlayers)
this.maxPlayers = maxPlayers;
saveParameters();
|
public java.lang.String | toString()
return "["
+ "delay=" + delay + ","
+ "countDown=" + countDown + ","
+ "maxPlayers=" + maxPlayers + ","
+ "maxCards=" + maxCards + "]";
|
protected void | updatePropertiesFromSettings()
properties.put(delayName, new Long(delay/ONE_SECOND).toString());
properties.put(countDownName, new Long(countDown/ONE_SECOND).toString());
properties.put(maxCardsName, new Integer(maxCards).toString());
properties.put(maxPlayersName, new Integer(maxPlayers).toString());
|
protected void | updateSettingsFromProperties()
try {
delay = Long.parseLong(properties.getProperty(delayName)) * ONE_SECOND;
countDown = Long.parseLong(properties.getProperty(countDownName)) * ONE_SECOND;
maxPlayers = Integer.parseInt(properties.getProperty(maxPlayersName));
maxCards = Integer.parseInt(properties.getProperty(maxCardsName));
} catch (NumberFormatException e) {
// we don't care if the property was of the wrong format,
// they've all got default values. So catch the exception
// and keep going.
}
|