breakout

package
v0.0.0-...-d396179 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameState

type GameState struct {
	Joystick JoystickPos
	Score    int
	Tiles    ScreenTiles
}

func Play

func Play(
	data []int64,
	screen tcell.Screen,
	frameDelay time.Duration,
	joystickInit JoystickPos,
) (GameState, error)

type JoystickPos

type JoystickPos int
const (
	NEUTRAL JoystickPos = 0
	LEFT    JoystickPos = -1
	RIGHT   JoystickPos = 1
)

type ScreenTiles

type ScreenTiles map[geom.Pt2]TileId

type TileId

type TileId int
const (
	EMPTY  TileId = 0
	WALL   TileId = 1
	BLOCK  TileId = 2
	PADDLE TileId = 3
	BALL   TileId = 4
)

Jump to

Keyboard shortcuts

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