miteknight

package
v0.3.26 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package miteknight implements the Termacade game Mite Knight.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a game.CreateFunc for Mite Knight.

Types

type MiteKnight

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

MiteKnight holds the game state for Mite Knight.

func (*MiteKnight) AIInput

func (mk *MiteKnight) AIInput() (input []float64, reward float64)

AIInput implements game.Interface.

func (*MiteKnight) Cleanup

func (mk *MiteKnight) Cleanup(ctx context.Context) error

Cleanup implements game.Interface.

func (*MiteKnight) Generate

func (mk *MiteKnight) Generate(ctx context.Context, progress func(percent int)) error

Generate implements game.Interface.

func (*MiteKnight) HighScore

func (mk *MiteKnight) HighScore() float64

HighScore implements game.Interface.

func (*MiteKnight) Init

func (mk *MiteKnight) Init(ctx context.Context) error

Init implements game.Interface.

func (*MiteKnight) InitAI

func (mk *MiteKnight) InitAI() *game.AIConfig

InitAI implements game.Interface.

func (*MiteKnight) LoadState

func (mk *MiteKnight) LoadState(save interface{})

LoadState implements game.Interface.

func (*MiteKnight) Logic

func (mk *MiteKnight) Logic(ctx context.Context) error

Logic implements game.Interface.

func (*MiteKnight) Render

func (mk *MiteKnight) Render()

Render implements game.Interface.

func (*MiteKnight) RenderAttract

func (mk *MiteKnight) RenderAttract(progress int, fadeIn, fadeOut bool)

RenderAttract implements game.Interface.

func (*MiteKnight) Rules

func (mk *MiteKnight) Rules() arcade.GameRules

Rules implements game.Interface.

func (*MiteKnight) SaveState

func (mk *MiteKnight) SaveState() interface{}

SaveState implements game.Interface.

func (*MiteKnight) StartGameplay

func (mk *MiteKnight) StartGameplay(_ context.Context) error

StartGameplay implements game.Interface.

func (*MiteKnight) StartMusic

func (mk *MiteKnight) StartMusic()

StartMusic implements game.Interface.

func (*MiteKnight) StartPressed

func (mk *MiteKnight) StartPressed()

StartPressed implements game.Interface.

func (*MiteKnight) Type

func (mk *MiteKnight) Type() arcade.Game

Type implements game.Interface.

Jump to

Keyboard shortcuts

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