system

package
v0.0.0-...-3548feb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: CC0-1.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenW float64 = 320
	ScreenH float64 = 480
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AI

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

func NewAIFromGenome

func NewAIFromGenome(width uint, height uint, genome []uint8) *AI

func NewAIFromPath

func NewAIFromPath(path string) (*AI, error)

func (*AI) GetMove

func (ai *AI) GetMove(g *entity.Grid) uint8

type Game

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

func NewGame

func NewGame(drawUI bool, debug bool, ticksLimit uint64, maxAsteroids uint, ship *entity.Ship, grid *entity.Grid, ai *AI) *Game

func (*Game) Draw

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

func (*Game) Layout

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

func (*Game) Update

func (g *Game) Update() error

Jump to

Keyboard shortcuts

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