Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedGameType = errors.New("unsupported game type")
)
Functions ¶
This section is empty.
Types ¶
type GameTypeRegistry ¶
type GameTypeRegistry struct {
// contains filtered or unexported fields
}
func NewGameTypeRegistry ¶
func NewGameTypeRegistry() *GameTypeRegistry
func (*GameTypeRegistry) CreatePlayer ¶
func (r *GameTypeRegistry) CreatePlayer(game types.GameMetadata, dir string) (scheduler.GamePlayer, error)
CreatePlayer creates a new game player for the given game, using the specified directory for persisting data.
func (*GameTypeRegistry) RegisterGameType ¶
func (r *GameTypeRegistry) RegisterGameType(gameType uint8, creator scheduler.PlayerCreator)
RegisterGameType registers a scheduler.PlayerCreator to use for a specific game type. Panics if the same game type is registered multiple times, since this indicates a significant programmer error.
Click to show internal directories.
Click to hide internal directories.