rooms

package
v0.0.0-...-04ace94 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameType

type GameType int

GameType is the type of a game

const (
	None GameType = iota
	Set
	Boggle
	RRobots
)

type Room

type Room struct {
	// Name is the human-readable unique identifier of the Room
	Name string `json:"name"`
	// Usernames are the usernames of players in the room
	Usernames map[string]bool `json:"usernames"`
	// GameType is the type of game currently being played in the room
	GameType GameType `json:"gameType"`
	// GameID is the identifier of the current game being played in the room
	GameID uuid.UUID `json:"gameID"`
}

Room is an instance of a game room

func NewRoom

func NewRoom(name string, usernames map[string]bool) *Room

NewRoom creates a room with given name and players

Jump to

Keyboard shortcuts

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