protocol

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Register configures the gob package to serialize all of the protocol messages

Types

type AddAIPlayer

type AddAIPlayer struct {
}

type AssignPlayerNumber

type AssignPlayerNumber struct {
	Number int
}

type ErrorMessage

type ErrorMessage struct {
	Message string
}

type PassTurn

type PassTurn struct {
}

type PlayCard

type PlayCard struct {
	Index int
}

type PlayerConn

type PlayerConn struct {
	*websocket.Conn
	context.Context
}

func (*PlayerConn) Recv

func (p *PlayerConn) Recv() ([]interface{}, error)

func (*PlayerConn) Send

func (p *PlayerConn) Send(msg interface{}) error

func (*PlayerConn) TakeTurn

func (p *PlayerConn) TakeTurn(playerNum int, gs *gamestate.GameState) error

type SetPlayerName

type SetPlayerName struct {
	Name string
}

type StartGame

type StartGame struct {
}

Jump to

Keyboard shortcuts

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