Commit 8bd43828 authored by rawan's avatar rawan

step1

parent c18cdb3c
...@@ -18,4 +18,21 @@ public class Vault { ...@@ -18,4 +18,21 @@ public class Vault {
} }
return x == this.password; return x == this.password;
} }
//
public int checkGuess(int guess) {
// same time delay
try {
Thread.sleep(5);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (guess == this.password) {
return 0; // true
} else if (guess < this.password) {
return -1; // Guess lower go higher
} else {
return 1; // Guess High Go Low
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment