Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrisGame ¶
type TrisGame struct {
// contains filtered or unexported fields
}
Player 1 is always X, player 2 is always O.
type TrisServer ¶
type TrisServer struct {
// contains filtered or unexported fields
}
func NewTrisServer ¶
func NewTrisServer(t transport.Transport, opts ...TrisServerOption) (*TrisServer, error)
func (*TrisServer) OnPlayerConnect ¶
func (s *TrisServer) OnPlayerConnect(node transport.Node) error
func (*TrisServer) Start ¶
func (s *TrisServer) Start() error
type TrisServerOption ¶
type TrisServerOption func(*trisServerOpts) error
TrisServerOption is a function that updates the trisServerOpts struct.
func WithLogger ¶
func WithLogger(logger *slog.Logger) TrisServerOption
WithLogger is a configuration function that updates the logger.
Click to show internal directories.
Click to hide internal directories.