helper

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandRng

func RandRng(min, max int) int

func RandomDurationMs

func RandomDurationMs(min, max int) time.Duration

func Screenshot

func Screenshot() image.Image

func Sleep

func Sleep(milliseconds int)

Sleep provides a Sleep function that randomize the sleep time up/down to a maximum of 30%

func Spiral

func Spiral(position int) (int, int)

Types

type GameManager

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

func NewGameManager

func NewGameManager(gr *reader.GameReader) *GameManager

func (*GameManager) CreateOnlineGame

func (gm *GameManager) CreateOnlineGame(gameCounter int) (string, error)

func (*GameManager) ExitGame

func (gm *GameManager) ExitGame() error

ExitGame tries to close the socket and also exit via game menu, what happens faster.

func (*GameManager) JoinOnlineGame

func (gm *GameManager) JoinOnlineGame(gameName, password string) error

func (*GameManager) NewGame

func (gm *GameManager) NewGame() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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