func main() { fmt.Println(c.CL + c.Y + "Welcome to Magic Eight Ball.") fmt.Println("Enter your questions below: " + c.X) for { text := input.Ask(c.Y + "--> " + c.X) if strings.Contains(text, "die") { fmt.Println(c.Random() + "I don't deal with pity mortal worries." + c.X) } else if strings.Contains(text, "love") { fmt.Println(c.Random() + "Blah Blah Blah.. Love whatever. Not my problem." + c.X) } else if strings.Contains(text, "exit") { utils.Bye() } else { answer := choice.Strings(answers) fmt.Println(c.Random() + answer + c.X) } } }
func main() { fmt.Println(c.CL + c.Y + "Welcome to the magic eight ball.") fmt.Println("Enter your yes or no questions below:" + c.X) for { question := input.Ask("--> " + c.B3) if strings.Contains(question, "die") || strings.Contains(question, "death") { fmt.Println(c.Random() + "I don't deal in death." + c.X) } else if strings.Contains(question, "love") { fmt.Println(c.Random() + "I always get love wrong." + c.X) } else if strings.Contains(question, "kiss ma booty cheeks") { fmt.Println(c.Random() + "as a quote from mr.rob cut that crap off!" + c.X) } else { answer := choice.Strings(answers) fmt.Println(c.Random() + answer + c.X) } } }
func rolldice(number string) int { n, _ := strconv.Atoi(number) total := 0 for i := 0; i < n; i++ { oneroll := rand.Intn(6) + 1 printedroll := strconv.Itoa(oneroll) print(c.X + c.Random() + printedroll + " ") total += oneroll } fmt.Println("") return total }
func main() { fmt.Println(c.CL + c.R + "MAGIC EIGHT BALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.") fmt.Println(c.X + c.R + "GIMME A QUESTION OR SOMETHING.") for true { question := input.Ask(c.X + c.R + "> " + c.B3) if strings.Contains(question, "love") { fmt.Println(c.R + "u w0t m8. Srsly? Love? Stahp.") } else if strings.Contains(question, "bye") { bye() } else { answer := choice.Strings(answers) fmt.Println(c.Random() + answer + c.X) } } }