package
0.0.0-20210213205245-22a39229fef6
Repository: https://github.com/alexandrelamarre/quantum-chess-backend.git
Documentation: pkg.go.dev

# Functions

NewGamePool builds a new game room with the given id.
NewPool creates an empty instance of a pool.
NewRooms creates a new empty instance of Rooms.
Upgrade turns a regular http Poll into a bi-directional websocket connection.

# Variables

BLACK int representing color black in chess.
DEBUG_DECODE toggles decoding debug messages in the console.
WHITE int representing the color white in chess.

# Structs

Client represents a new websocket connection, with the user's id, and the pool it communicates through.
GameClient represents a new websocket connection to manage games, with the user's id, and the game pool it is connected to.
GameInfo stores the info that should be sent to users seeking to display a list of gamerooms.
GameMessage allows us to unpack the content of JSON transmitted through the game pool.
GamePool manages the communication channels of a specific Game room.
Message target object to decode the JSON messages of the general websocket connection.
Pool manages the communication channels of a websocket.
Rooms represent a struct that manages all games and their privacy.