Documentation
¶
Overview ¶
Package flowerjourney implements the Termacade game Flower Journey.
Index ¶
- func New(rules arcade.FlowerJourneyRules) game.CreateFunc
- type FlowerJourney
- func (fj *FlowerJourney) AIInput() (input []float64, reward float64)
- func (fj *FlowerJourney) Cleanup(ctx context.Context) error
- func (fj *FlowerJourney) Generate(ctx context.Context, progress func(int)) error
- func (fj *FlowerJourney) HighScore() float64
- func (fj *FlowerJourney) Init(ctx context.Context) error
- func (fj *FlowerJourney) InitAI() *game.AIConfig
- func (fj *FlowerJourney) LoadState(v interface{})
- func (fj *FlowerJourney) Logic(ctx context.Context) error
- func (fj *FlowerJourney) Render()
- func (fj *FlowerJourney) RenderAttract(progress int, fadeIn, fadeOut bool)
- func (fj *FlowerJourney) Rules() arcade.GameRules
- func (fj *FlowerJourney) SaveState() interface{}
- func (fj *FlowerJourney) StartGameplay(ctx context.Context) error
- func (fj *FlowerJourney) StartMusic()
- func (fj *FlowerJourney) StartPressed()
- func (fj *FlowerJourney) Type() arcade.Game
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(rules arcade.FlowerJourneyRules) game.CreateFunc
New returns a game.CreateFunc for Flower Journey.
Types ¶
type FlowerJourney ¶
type FlowerJourney struct {
// contains filtered or unexported fields
}
FlowerJourney holds the game state for Flower Journey.
func (*FlowerJourney) AIInput ¶
func (fj *FlowerJourney) AIInput() (input []float64, reward float64)
AIInput implements game.Interface.
func (*FlowerJourney) Cleanup ¶
func (fj *FlowerJourney) Cleanup(ctx context.Context) error
Cleanup implements game.Interface.
func (*FlowerJourney) Generate ¶
func (fj *FlowerJourney) Generate(ctx context.Context, progress func(int)) error
Generate implements game.Interface.
func (*FlowerJourney) HighScore ¶
func (fj *FlowerJourney) HighScore() float64
HighScore implements game.Interface.
func (*FlowerJourney) Init ¶
func (fj *FlowerJourney) Init(ctx context.Context) error
Init implements game.Interface.
func (*FlowerJourney) InitAI ¶
func (fj *FlowerJourney) InitAI() *game.AIConfig
InitAI implements game.Interface.
func (*FlowerJourney) LoadState ¶
func (fj *FlowerJourney) LoadState(v interface{})
LoadState implements game.Interface.
func (*FlowerJourney) Logic ¶
func (fj *FlowerJourney) Logic(ctx context.Context) error
Logic implements game.Interface.
func (*FlowerJourney) RenderAttract ¶
func (fj *FlowerJourney) RenderAttract(progress int, fadeIn, fadeOut bool)
RenderAttract implements game.Interface.
func (*FlowerJourney) Rules ¶
func (fj *FlowerJourney) Rules() arcade.GameRules
Rules implements game.Interface.
func (*FlowerJourney) SaveState ¶
func (fj *FlowerJourney) SaveState() interface{}
SaveState implements game.Interface.
func (*FlowerJourney) StartGameplay ¶
func (fj *FlowerJourney) StartGameplay(ctx context.Context) error
StartGameplay implements game.Interface.
func (*FlowerJourney) StartMusic ¶
func (fj *FlowerJourney) StartMusic()
StartMusic implements game.Interface.
func (*FlowerJourney) StartPressed ¶
func (fj *FlowerJourney) StartPressed()
StartPressed implements game.Interface.
func (*FlowerJourney) Type ¶
func (fj *FlowerJourney) Type() arcade.Game
Type implements game.Interface.