NumberLock hint() kommentar hinzugefügt

This commit is contained in:
2020-09-24 11:09:12 +02:00
parent 61affb4d0d
commit 617478376b
21 changed files with 1877 additions and 21 deletions

View File

@@ -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.";