game

package
v0.0.0-...-2bcf55f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Requirements    string
	Name            string
	TextInstigatorF string
	TextInstigatorM *string
	TextReceiverF   string
	TextReceiverM   *string
	Action          string
	Reactions       []string
}

type Gender

type Gender int
const (
	Undefined Gender = iota
	Female
	Male
)

type Player

type Player struct {
	// contains filtered or unexported fields
}

func (*Player) ChatId

func (thisPlayer *Player) ChatId() int64

func (*Player) Gender

func (thisPlayer *Player) Gender() Gender

func (*Player) Name

func (thisPlayer *Player) Name() string

func (*Player) SetChatId

func (thisPlayer *Player) SetChatId(chatId int64)

func (*Player) SetGender

func (thisPlayer *Player) SetGender(gender Gender)

func (*Player) SetName

func (thisPlayer *Player) SetName(name string)

func (*Player) SetWorld

func (thisPlayer *Player) SetWorld(world *World)

func (*Player) World

func (thisPlayer *Player) World() *World

type StaticData

type StaticData struct {
	Actions map[string]*Action
	NamesF  []string
	NamesM  []string
}

type World

type World struct {
	// contains filtered or unexported fields
}

func (*World) ChangeTurn

func (thisWorld *World) ChangeTurn()

func (*World) CurrentPlayer

func (thisWorld *World) CurrentPlayer() *Player

func (*World) Execute

func (thisWorld *World) Execute(command string)

func (*World) Init

func (thisWorld *World) Init()

func (*World) InitTurn

func (thisWorld *World) InitTurn(forcedPlayer *Player)

func (*World) IsTrue

func (thisWorld *World) IsTrue(command string) bool

func (*World) Opponent

func (thisWorld *World) Opponent() *Player

func (*World) PlayerF

func (thisWorld *World) PlayerF() *Player

func (*World) PlayerM

func (thisWorld *World) PlayerM() *Player

func (*World) SetPlayerF

func (thisWorld *World) SetPlayerF(player *Player)

func (*World) SetPlayerM

func (thisWorld *World) SetPlayerM(player *Player)

Jump to

Keyboard shortcuts

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