game

package
v0.0.0-...-69589a7 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

func NewGame

func NewGame() *Game

func (*Game) AddSession

func (game *Game) AddSession(session *net.Session)

func (*Game) HandleSessionInput

func (game *Game) HandleSessionInput(input *net.SessionInput)

func (*Game) ProcessTasks

func (game *Game) ProcessTasks()

func (*Game) RemoveSession

func (game *Game) RemoveSession(session *net.Session)

type InputHandler

type InputHandler func(*Game, *User, string)

type User

type User struct {
	Session       *net.Session
	InputHandlers []InputHandler
}

func NewUser

func NewUser(session *net.Session) *User

func (*User) HandleInput

func (user *User) HandleInput(game *Game, input string)

Jump to

Keyboard shortcuts

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