state

package
v0.0.0-...-b8f7dfc Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OverlayState

type OverlayState struct {
	Table                     int  `json:"table"`
	Hidden                    bool `json:"hidden"`
	ShowFlags                 bool `json:"showFlags"`
	ShowFargo                 bool `json:"showFargo"`
	ShowScore                 bool `json:"showScore"`
	WaitingForPlayers         bool `json:"waitingForPlayers"`
	WaitingForTournamentStart bool `json:"waitingForTournamentStart"`
	TableNoLongerInUse        bool `json:"tableNoLongerInUse"`
	// contains filtered or unexported fields
}

func NewOverlayState

func NewOverlayState(table int) *OverlayState

NewOverlayState creates a new overlay state.

func (*OverlayState) SetFargo

func (s *OverlayState) SetFargo(showFargo bool) bool

SetFargo sets the visibility of fargo ratings on the overlay.

func (*OverlayState) SetFlags

func (s *OverlayState) SetFlags(showFlags bool) bool

SetFlags sets the visibility of flags on the overlay.

func (*OverlayState) SetHidden

func (s *OverlayState) SetHidden(hidden bool) bool

SetHidden sets the visibility of the overlay.

func (*OverlayState) SetScore

func (s *OverlayState) SetScore(showScore bool) bool

SetScore sets the visibility of the player scores on the overlay.

func (*OverlayState) ToggleFargo

func (s *OverlayState) ToggleFargo() bool

ToggleFargo toggles the visibility of fargo ratings on the overlay.

func (*OverlayState) ToggleFlags

func (s *OverlayState) ToggleFlags() bool

ToggleFlags toggles the visibility of flags on the overlay.

func (*OverlayState) ToggleHidden

func (s *OverlayState) ToggleHidden() bool

ToggleHidden toggles the visibility of the overlay.

func (*OverlayState) ToggleScore

func (s *OverlayState) ToggleScore() bool

ToggleScore toggles the visibility of the player scores on the overlay.

type State

type State struct {
	Table   int           `json:"table"`
	Game    *models.Game  `json:"game"`
	Overlay *OverlayState `json:"overlay"`
}

State is the current state of the overlay.

func NewState

func NewState(db *gorm.DB, table int) *State

NewState creates a new state.

Jump to

Keyboard shortcuts

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