server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player interface {
	Conn() network.Connection
	SetConn(network.Connection)
	IsReady() bool
	SetReady(bool)
	// contains filtered or unexported methods
}

Player represents a player in the game.

func NewPlayer

func NewPlayer(conn network.Connection, key, name string) Player

NewPlayer creates a new player.

type Server

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

Server is responsible for handling WS connections and passing them over to the lobby.

func NewServer

func NewServer(port uint16, l *slog.Logger) *Server

func (*Server) Start

func (s *Server) Start(a *game.Assets)

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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