mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2024-11-14 04:03:53 +01:00
12 lines
203 B
Go
12 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
|
||
|
}
|