tris

package
v0.0.0-...-060d5e1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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