Documentation ¶
Index ¶
- Variables
- func NewGameLogicByTitle(title string) gamelogic.GameLogic
- type GameNodeRequester
- type RoomNode
- func (roomNode *RoomNode) ConfirmConnectToGame()
- func (roomNode *RoomNode) ConnectedToGame() <-chan struct{}
- func (roomNode *RoomNode) GetID() int
- func (roomNode *RoomNode) GetOwnerName() string
- func (roomNode *RoomNode) GetPlayersLimit() int
- func (roomNode *RoomNode) GlobalWriteMessage(msg *message.JSON)
- func (roomNode *RoomNode) ReadMessage(msg rtclient.MessageWithClient)
- func (roomNode *RoomNode) Run(requester GameNodeRequester)
- func (roomNode *RoomNode) SetRandomID()
- func (roomNode *RoomNode) WriteMessageTo(msg *message.JSON, name string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoClients = errors.New("no clients in the room")
Functions ¶
func NewGameLogicByTitle ¶
Types ¶
type GameNodeRequester ¶
type GameNodeRequester interface {
RequestUpdatingRoomsJSON()
}
type RoomNode ¶
type RoomNode struct { Flow runflow.RunFlow Clients children.MapChildren[string, *roomclient.RoomClient] // contains filtered or unexported fields }
Layer of RT which is responsible for connections: RoomNode > RoomClients
func NewRoomNode ¶
func (*RoomNode) ConfirmConnectToGame ¶
func (roomNode *RoomNode) ConfirmConnectToGame()
func (*RoomNode) ConnectedToGame ¶
func (roomNode *RoomNode) ConnectedToGame() <-chan struct{}
func (*RoomNode) GetOwnerName ¶
func (*RoomNode) GetPlayersLimit ¶
func (*RoomNode) GlobalWriteMessage ¶
write a message to every client
func (*RoomNode) ReadMessage ¶
func (roomNode *RoomNode) ReadMessage(msg rtclient.MessageWithClient)
func (*RoomNode) Run ¶
func (roomNode *RoomNode) Run(requester GameNodeRequester)
func (*RoomNode) SetRandomID ¶
func (roomNode *RoomNode) SetRandomID()
Click to show internal directories.
Click to hide internal directories.