run

package
v0.0.0-...-883f3e4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func DefaultConfig

func DefaultConfig() Config

func (Config) ShowCursor

func (c Config) ShowCursor() bool

func (Config) Size

func (c Config) Size() (width, height int)

func (Config) Title

func (c Config) Title() string

func (Config) Windowed

func (c Config) Windowed() bool

func (Config) WithFullScreen

func (c Config) WithFullScreen() Config

func (Config) WithHiddenCursor

func (c Config) WithHiddenCursor() Config

func (Config) WithSize

func (c Config) WithSize(width, height int) Config

func (Config) WithTitle

func (c Config) WithTitle(title string) Config

func (Config) WithVisibleCursor

func (c Config) WithVisibleCursor() Config

func (Config) WithWindow

func (c Config) WithWindow() Config

type Game

type Game interface {
	// Draw the game's state onto the target.
	Draw(tgt draw.Target, src input.Source)

	// Update the game's state
	Update(src input.Source, dt time.Duration) (Game, error)
}

A Game that can be run.

Draw and Update will never be called concurrently. Besides that no ordering is guaranteed.

This package only defines the interface. Runner packages might use different underlying libraries.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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