-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
43 lines (38 loc) · 983 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
fmt.Println("> Welcome to pokedex, type <help> to know more")
reader := bufio.NewReader(os.Stdin)
for {
fmt.Print("> ")
text, _ := reader.ReadString('\n')
text = text[:len(text)-1]
switch text {
case "explore":
fmt.Println("You entered explore zone")
random_pokemons()
case "start":
fmt.Println("You entered the pokedex")
startingRepl()
case "help":
fmt.Println("Welcome to the Pokedex!")
fmt.Println("Usage: ")
fmt.Println()
fmt.Println("help: Displays a help message")
fmt.Println("type <start> to enter pokedex")
fmt.Println("type <explore> to explore areas")
fmt.Println("type <explore area-name> to see the pokemons available")
fmt.Println("type <pokemon name> to get details about it")
fmt.Println("type catch to catch the pokemon")
fmt.Println("exit: Exit the Pokedex")
case "exit":
os.Exit(0)
default:
fmt.Println("Invalid option")
}
}
}