|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dolben.MarkN.Score
public class Score
This is the score for some guess compared to a target.
| Constructor Summary | |
|---|---|
Score()
constructs a new score |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
makes a new copy of this score |
boolean |
correct()
tests whether or not this score indicates a correct guess |
void |
count(boolean inplace)
increments one of the score's counters |
boolean |
equal(Score s)
tests whether or not this score is equal to the given one |
int |
getMisplaced()
gets the number of digits which are in the wrong place |
int |
getPlaced()
gets the number of digits which are in the right place |
void |
setMisplaced(int misplaced)
sets the number of digits which are in the wrong place |
void |
setPlaced(int placed)
sets the number of digits which are in the right place |
java.lang.String |
toString()
makes a string of the score |
boolean |
valid()
tests whether or not this score is valid |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
Score()
| Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Objectpublic void setPlaced(int placed)
placed - the number of digits in the right placepublic int getPlaced()
public void setMisplaced(int misplaced)
misplaced - the number of digits in the wrong placepublic int getMisplaced()
public boolean correct()
public boolean valid()
public boolean equal(Score s)
s - the score to check for equality
public void count(boolean inplace)
inplace - true iff the counter for digits in the right place is
to be incrementedpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||