game

package
v0.1.0-pre Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []Cmd{
	{Name: "catch", Description: "Walks you through catching a new Pokemon"},
	{Name: "kill", Description: "Kill all Pokemon in a route", Args: &[]Arg{
		{Name: "route", Description: "Name of the route to kill (case insensitive)", Optional: true},
	}},
	{Name: "end", Description: "Ends the game (whiteout / blackout)"},
	{Name: "quit", Description: "Quit from the terminal (ctrl + c)"},
	{Name: "help", Description: "Displays help", Args: &[]Arg{
		{Name: "command", Description: "Name of a command to display help for", Optional: true},
	}},
}

Functions

func Help

func Help(commands *[]Cmd) string

func Play

func Play(name string)

Types

type Arg

type Arg struct {
	Name        string
	Description string
	Optional    bool
}

type Cmd

type Cmd struct {
	Name        string
	Description string
	Args        *[]Arg
}

func (*Cmd) Help

func (cmd *Cmd) Help() string

Return help for a command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL