Update: change the solution to follow instrucion
The exercise restriction says, "Do not make the game too easy. Only adjust the difficulty if the guess is above 10."
This commit is contained in:
@ -50,7 +50,12 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
for turn := maxTurns + guess/4; turn > 0; turn-- {
|
||||
var balancer int
|
||||
if guess > 10 {
|
||||
balancer = guess / 4
|
||||
}
|
||||
|
||||
for turn := maxTurns + balancer; turn > 0; turn-- {
|
||||
n := rand.Intn(guess) + 1
|
||||
|
||||
if n == guess {
|
||||
|
Reference in New Issue
Block a user