game

package
v0.0.0-...-f38051e Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

Game implements ebiten callbacks for fluid simulation demo

func New

func New(gridSize, scale int) (game *Game, err error)

New creates a game, given:

gridSize - width and height of grid used to model fluid
scale    - width and height used to display of each cell

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

Draw draws on the screen with each tick

func (*Game) Layout

func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

Layout takes the outside size (e.g., the window size) and returns the (logical) screen size

func (*Game) Update

func (g *Game) Update() (err error)

Update updates internal state with each tick

Jump to

Keyboard shortcuts

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