Documentation ¶
Overview ¶
Package miteknight implements the Termacade game Mite Knight.
Index ¶
- func New(rules arcade.MiteKnightRules) game.CreateFunc
- type MiteKnight
- func (mk *MiteKnight) AIInput() (input []float64, reward float64)
- func (mk *MiteKnight) Cleanup(ctx context.Context) error
- func (mk *MiteKnight) Generate(ctx context.Context, progress func(percent int)) error
- func (mk *MiteKnight) HighScore() float64
- func (mk *MiteKnight) Init(ctx context.Context) error
- func (mk *MiteKnight) InitAI() *game.AIConfig
- func (mk *MiteKnight) LoadState(save interface{})
- func (mk *MiteKnight) Logic(ctx context.Context) error
- func (mk *MiteKnight) Render()
- func (mk *MiteKnight) RenderAttract(progress int, fadeIn, fadeOut bool)
- func (mk *MiteKnight) Rules() arcade.GameRules
- func (mk *MiteKnight) SaveState() interface{}
- func (mk *MiteKnight) StartGameplay(_ context.Context) error
- func (mk *MiteKnight) StartMusic()
- func (mk *MiteKnight) StartPressed()
- func (mk *MiteKnight) Type() arcade.Game
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(rules arcade.MiteKnightRules) game.CreateFunc
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) 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.