game

package
v0.0.0-...-bcd4b97 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const HitRange = 0.75
View Source
const MaxFPS = 50.0

Variables

This section is empty.

Functions

func ColorConv

func ColorConv(c color.Color) tcell.Color

Types

type Cell

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

type Game

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

func NewGame

func NewGame() *Game

func (*Game) Background

func (g *Game) Background(c color.Color)

func (*Game) Bottom

func (g *Game) Bottom() int

func (*Game) DeltaT

func (g *Game) DeltaT() time.Duration

func (*Game) DrawText

func (g *Game) DrawText(x, y int, text string)

func (*Game) Foreground

func (g *Game) Foreground(c color.Color)

func (*Game) Frame

func (g *Game) Frame() int

func (*Game) Height

func (g *Game) Height() int

func (*Game) Left

func (g *Game) Left() int

func (*Game) Loop

func (g *Game) Loop()

func (*Game) MouseX

func (g *Game) MouseX() int

func (*Game) MouseY

func (g *Game) MouseY() int

func (*Game) Noise

func (g *Game) Noise() opensimplex.Noise

func (*Game) OutOfScreen

func (g *Game) OutOfScreen(x, y int) bool

func (*Game) PatchChar

func (g *Game) PatchChar(x, y int, r rune)

func (*Game) PlayerX

func (g *Game) PlayerX() float64

func (*Game) PlayerY

func (g *Game) PlayerY() float64

func (*Game) PutChar

func (g *Game) PutChar(x, y int, r rune)

func (*Game) PutColor

func (g *Game) PutColor(x, y int)

func (*Game) ResetStyle

func (g *Game) ResetStyle()

func (*Game) Right

func (g *Game) Right() int

func (*Game) Top

func (g *Game) Top() int

func (*Game) Width

func (g *Game) Width() int

type GameState

type GameState int
const (
	Playing GameState = iota
	GameOver
)

Jump to

Keyboard shortcuts

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