mirror of
https://github.com/Crocmagnon/gopher-the-number.git
synced 2025-01-22 05:13:47 +01:00
Add a message at the beginning of the game
This commit is contained in:
parent
1d85612173
commit
7efe5d8b96
1 changed files with 4 additions and 1 deletions
5
main.go
5
main.go
|
@ -1,11 +1,14 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
random := rand.Intn(100)
|
max := 100
|
||||||
|
fmt.Printf("I've picked a number between 0 and %d. Can you guess it?\n", max)
|
||||||
|
random := rand.Intn(max)
|
||||||
LoopUntilFound(os.Stdout, os.Stdin, random)
|
LoopUntilFound(os.Stdout, os.Stdin, random)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue