Documentation ¶
Index ¶
- func NullObject(name string) G.IObject
- func SaveGame(g G.Play, autosave bool) (string, error)
- type Game
- type LogAdapter
- type RuntimeConfig
- func (cfg RuntimeConfig) Finalize() internal.RuntimeCore
- func (cfg RuntimeConfig) MakeGame(m meta.Model) Game
- func (cfg *RuntimeConfig) SetCalls(calls api.LookupCallbacks) *RuntimeConfig
- func (cfg *RuntimeConfig) SetFrame(e api.EventFrame) *RuntimeConfig
- func (cfg *RuntimeConfig) SetLog(log api.Log) *RuntimeConfig
- func (cfg *RuntimeConfig) SetOutput(o api.Output) *RuntimeConfig
- func (cfg *RuntimeConfig) SetParentLookup(l api.LookupParents) *RuntimeConfig
- func (cfg *RuntimeConfig) SetRand(rand *rand.Rand) *RuntimeConfig
- func (cfg *RuntimeConfig) SetSaveLoad(s api.SaveLoad) *RuntimeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NullObject ¶
Types ¶
type Game ¶
func (*Game) NewAdapter ¶
func (g *Game) NewAdapter() *internal.GameEventAdapter
func (*Game) ProcessActions ¶
Update game until the event queue till empty, or errored.
func (*Game) QueueAction ¶
func (g *Game) QueueAction(action string, nouns ...ident.Id) (ret *internal.RuntimeAction, err error)
ex. parsing raw input, ending turns, testing.
func (*Game) QueueActionInstances ¶
func (g *Game) QueueActionInstances(act meta.Action, objects []meta.Instance) *internal.RuntimeAction
ex. after having parsed and matched raw player input.
type LogAdapter ¶
type LogAdapter struct {
// contains filtered or unexported fields
}
func (LogAdapter) Printf ¶
func (log LogAdapter) Printf(format string, v ...interface{})
func (LogAdapter) Println ¶
func (log LogAdapter) Println(v ...interface{})
type RuntimeConfig ¶
type RuntimeConfig struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig() *RuntimeConfig
func (RuntimeConfig) Finalize ¶
func (cfg RuntimeConfig) Finalize() internal.RuntimeCore
func (*RuntimeConfig) SetCalls ¶
func (cfg *RuntimeConfig) SetCalls(calls api.LookupCallbacks) *RuntimeConfig
func (*RuntimeConfig) SetFrame ¶
func (cfg *RuntimeConfig) SetFrame(e api.EventFrame) *RuntimeConfig
StartFrame and EndFrame should be merged into Output -- and they should be renamed: BeginEvent() EndEvent() *maybe* Target should be mapped into prototype Class should be removed from E.Target only: how do we know that a thing is a "class" and should get "Class" resource? could potentially send target type to startframe right now it seems redicoulous that the game decides that.
func (*RuntimeConfig) SetLog ¶
func (cfg *RuntimeConfig) SetLog(log api.Log) *RuntimeConfig
func (*RuntimeConfig) SetOutput ¶
func (cfg *RuntimeConfig) SetOutput(o api.Output) *RuntimeConfig
func (*RuntimeConfig) SetParentLookup ¶
func (cfg *RuntimeConfig) SetParentLookup(l api.LookupParents) *RuntimeConfig
func (*RuntimeConfig) SetRand ¶
func (cfg *RuntimeConfig) SetRand(rand *rand.Rand) *RuntimeConfig
func (*RuntimeConfig) SetSaveLoad ¶
func (cfg *RuntimeConfig) SetSaveLoad(s api.SaveLoad) *RuntimeConfig
Click to show internal directories.
Click to hide internal directories.