mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2024-11-14 20:23:53 +01:00
11 lines
203 B
Go
11 lines
203 B
Go
package lib
|
|
|
|
func CheckGuess(guess, random int) (string, bool) {
|
|
if guess == random {
|
|
return "Good job!", true
|
|
}
|
|
if random > guess {
|
|
return "Try higher.", false
|
|
}
|
|
return "Nope, lower.", false
|
|
}
|