room

package
v0.0.0-...-64be0d3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

func NewCollection

func NewCollection() *Collection

func (*Collection) GetRoom

func (c *Collection) GetRoom(gameId string) *Room

func (*Collection) GetRoomForGame

func (c *Collection) GetRoomForGame(game *game.Game) *Room

func (*Collection) NewRoom

func (c *Collection) NewRoom() *Room

func (*Collection) RemoveRoom

func (c *Collection) RemoveRoom(gameId string)

type Room

type Room struct {
	Mu   sync.RWMutex
	Game *game.Game
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(game *game.Game) *Room

func (*Room) EnsurePlayer

func (r *Room) EnsurePlayer(existingPlayerId string) string

func (*Room) Listen

func (r *Room) Listen(ctx context.Context) <-chan struct{}

func (*Room) Notify

func (r *Room) Notify()

Jump to

Keyboard shortcuts

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