room

package
v0.0.0-...-e57d4e3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PacketRoomTradeRequireSameMap

func PacketRoomTradeRequireSameMap() mpacket.Packet

PacketRoomTradeRequireSameMap error message

Types

type Game

type Game interface {
	CheckPassword(string, player) bool
	Ready(player)
	Unready(player)
	Start()
	DisplayBytes() []byte
	KickPlayer(player, byte) bool
	Expel() bool
	ChangeTurn()
	RequestTie(player)
	RequestTieResult(bool, player)
	Forfeit(player)
	RequestExit(bool, player)
}

Game base behaviours

type Memory

type Memory interface {
	SelectCard(byte, byte, player) bool
}

Memory behaviours

type Omok

type Omok interface {
	PlacePiece(int32, int32, byte, player) bool
	RequestUndo(player)
	RequestUndoResult(bool, player)
}

Omok behaviours

type Room

type Room interface {
	ID() int32
	AddPlayer(player) bool
	Closed() bool
	Present(int32) bool
	ChatMsg(player, string)
	OwnerID() int32
}

Room base behaviours

func NewMemory

func NewMemory(id int32, name, password string, boardType byte) Room

NewMemory a new memory

func NewOmok

func NewOmok(id int32, name, password string, boardType byte) Room

NewOmok returns a new Omok

type Trade

type Trade interface {
	RemovePlayer(player)
	SendInvite(player)
	Reject(byte, string)
}

Trade behaviours

func NewTrade

func NewTrade(id int32) Trade

NewTrade a trade

Jump to

Keyboard shortcuts

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