示例#1
0
func init() {
	// Flags
	flag.Usage = func() {
		fmt.Fprintf(os.Stderr, "usage: %s [default_static_dir]\n", os.Args[0])
		flag.PrintDefaults()
	}
	flag.StringVar(&hostname, "h", "localhost", "hostname")
	flag.IntVar(&port, "p", 8080, "port")
	flag.StringVar(&topStaticDir, "static_dir", "", "static directory in addition to default static directory")
	game = antfarm.MakeGame("../antfarm-data", 20, 20, 1)
}
示例#2
0
func main() {
	fmt.Println("Starting...")
	game := antfarm.MakeGame(".", 20, 20, 1)
	game.StartShell()
}