runtime

package
v0.0.0-...-9034458 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NullObject

func NullObject(name string) G.IObject

func SaveGame

func SaveGame(g G.Play, autosave bool) (string, error)

Types

type Game

type Game struct {
	meta.Model
	// contains filtered or unexported fields
}

func (*Game) NewAdapter

func (g *Game) NewAdapter() *internal.GameEventAdapter

func (*Game) ProcessActions

func (g *Game) ProcessActions() error

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) MakeGame

func (cfg RuntimeConfig) MakeGame(m meta.Model) Game

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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