xo_state

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2019 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Namespace = hexdigest("xo")[:6]

Functions

This section is empty.

Types

type Game

type Game struct {
	Board   string
	State   string
	Player1 string
	Player2 string
	Name    string
}

type XoState

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

XoState handles addressing, serialization, deserialization, and holding an addressCache of data at the address.

func NewXoState

func NewXoState(context *processor.Context) *XoState

NewXoState constructs a new XoState struct.

func (*XoState) DeleteGame

func (self *XoState) DeleteGame(name string) error

DeleteGame deletes the game from state, handling hash collisions.

func (*XoState) GetGame

func (self *XoState) GetGame(name string) (*Game, error)

GetGame returns a game by it's name.

func (*XoState) SetGame

func (self *XoState) SetGame(name string, game *Game) error

SetGame sets a game to it's name

Jump to

Keyboard shortcuts

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