commands

package
v0.0.0-...-c4db5c5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DisplayCommand = cli.Command{
	Name:   "display",
	Usage:  "Launch display server for an existing game",
	Action: display,
	Flags: []cli.Flag{
		cli.IntFlag{
			Name:  "port",
			Usage: "port of display server",
			Value: 8080,
		},
	},
}
View Source
var JoinCommand = cli.Command{
	Name:   "join",
	Usage:  "Join an existing game",
	Action: joinGame,
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "players",
			Usage: "comma-separated list of player names",
			Value: "Roy",
		},
		cli.StringFlag{
			Name: "team",
			Usage: fmt.Sprintf("team to assign players to "+
				"(%s / %s / both). On 'both' players will be assigned equally to both team",
				string(models.Brazil),
				string(models.Argentina),
			),
			Value: string(models.Brazil),
		},
	},
}
View Source
var SimulateCommand = cli.Command{
	Name:   "simulate",
	Usage:  "Run an End-to-End game simulation",
	Action: simulate,
	Flags: []cli.Flag{
		cli.IntFlag{
			Name:  "players",
			Usage: "total number of players - distributed evenly to teams",
			Value: 4,
		},
		cli.IntFlag{
			Name:  "port",
			Usage: "port of display server",
			Value: 8080,
		},
	},
}
View Source
var ThrowCommand = cli.Command{
	Name:   "throw",
	Usage:  "Throw a new ball to an existing game",
	Action: throwBall,
	Flags: []cli.Flag{
		cli.IntFlag{
			Name:  "x",
			Usage: "initial X coordinate of thrown ball",
			Value: 8,
		},
		cli.IntFlag{
			Name:  "y",
			Usage: "initial Y coordinate of thrown ball",
			Value: 5,
		},
		cli.BoolFlag{
			Name:  "manual",
			Usage: "use specific coordinates to place the ball. Otherwise a random position will be used",
		},
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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