how to tell if you got pygAME
package main
import (
"fmt"
"strings"
)
func hasPygame(text string) bool {
return strings.Contains(strings.ToLower(text), "pygame")
}
func main() {
gameInfo := "Pygame is a cross-platform set of Python modules designed for writing video games."
if hasPygame(gameInfo) {
fmt.Println("You have Pygame.")
} else {
fmt.Println("Pygame is not detected.")
}
}