games

package
v0.0.0-...-73daa5e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotsBasedGame

type BotsBasedGame struct {
	Game
	Bots []bots.Bot
}

func (*BotsBasedGame) RegisterBot

func (g *BotsBasedGame) RegisterBot(bot bots.Bot)

type Game

type Game interface {
	Run(string, chan GameStep) error
	Name() string
	CheckArgs([]string) error
	RegisterBot(bots.Bot)
	GetAsciiOutput() []byte
}

type GameStep

type GameStep struct {
	Error           error
	QuestionMessage *bots.QuestionMessage
	ReplyMessage    *bots.ReplyMessage
	Message         string
	Winner          bots.Bot
	Loser           bots.Bot
	Draw            bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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