|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dolben.MarkN.Configuration
public class Configuration
This is the configuration for the N Digit Number Game: the number (N) of places in a target or guess, and the number of digits that are used (e.g., 10, ('0'-'9')). Note that the terminology is conflicting, as "N Digit" in the name of the game, denotes the number of places in a Number.
| Constructor Summary | |
|---|---|
Configuration()
|
|
| Method Summary | |
|---|---|
static int |
getDigits()
gets the number of digits |
static int |
getPlaces()
gets the number of places |
static void |
setDigits(java.lang.String s)
sets the number of digits |
static void |
setPlaces(java.lang.String s)
sets the number of places |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Configuration()
| Method Detail |
|---|
public static void setDigits(java.lang.String s)
throws java.lang.Exception
s - the number of digits as represented by a string
java.lang.Exception - when s cannot be parsed as an integer,
or the number doesn't result in a valid configuration,
or the configuration has already been used
public static void setPlaces(java.lang.String s)
throws java.lang.Exception
s - the number of places, N, as represented by a string
java.lang.Exception - when s cannot be parsed as an integer,
or the number doesn't result in a valid configuration,
or the configuration has already been usedpublic static int getDigits()
public static int getPlaces()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||