NumberLock hint() kommentar hinzugefügt
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
public class NumberLock extends Lock {
|
||||
|
||||
protected int correctNumber, lastGuess;
|
||||
//
|
||||
public NumberLock( int pCorrectNumber ) {
|
||||
correctNumber = pCorrectNumber;
|
||||
lastGuess = -1;
|
||||
@@ -24,7 +25,7 @@ public class NumberLock extends Lock {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//Gibt dir einen Tipp ob die Nummer zu klein, zu groß oder passt
|
||||
public String hint() {
|
||||
if( lastGuess == -1 ) {
|
||||
return "Du hast bisher nicht versucht das Schloss zu öffnen.";
|
||||
|
||||
Reference in New Issue
Block a user