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:
AminBhr
2021-09-27 02:20:59 +03:30
committed by İnanç Gümüş
parent 19a495499e
commit 5ba12125ed

View File

@ -50,7 +50,12 @@ func main() {
return 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 n := rand.Intn(guess) + 1
if n == guess { if n == guess {