mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2024-11-09 17:53:54 +01:00
11 lines
204 B
Go
11 lines
204 B
Go
package main
|
|
|
|
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
|
|
}
|