add RegisterMap for testing convenience

This commit is contained in:
Rob O'Dwyer 2022-05-11 08:28:13 -07:00
parent dab9178a55
commit 1dcc1352cc

View file

@ -33,3 +33,8 @@ func (registry MapRegistry) GetMap(id string) (GameMap, error) {
func GetMap(id string) (GameMap, error) {
return globalRegistry.GetMap(id)
}
// RegisterMap adds a map to the global registry.
func RegisterMap(id string, m GameMap) {
globalRegistry.RegisterMap(id, m)
}