diff --git a/pkg/atlas/objects.go b/pkg/atlas/objects.go index c397ec1..cb71229 100644 --- a/pkg/atlas/objects.go +++ b/pkg/atlas/objects.go @@ -1,31 +1,32 @@ package atlas -// Type represents an object type -type Type byte +// ObjectType represents an object type +type ObjectType byte // Types of objects const ( // ObjectNone represents no object at all - ObjectNone = Type(GlyphNone) + ObjectNone = ObjectType(GlyphNone) // ObjectRover represents a live rover - ObjectRover = Type(GlyphRover) + ObjectRover = ObjectType(GlyphRover) // ObjectSmallRock is a small stashable rock - ObjectSmallRock = Type(GlyphSmallRock) + ObjectSmallRock = ObjectType(GlyphSmallRock) // ObjectLargeRock is a large blocking rock - ObjectLargeRock = Type('O') + ObjectLargeRock = ObjectType(GlyphLargeRock) ) // Object represents an object in the world type Object struct { - Type Type `json:"type"` + // The type of the object + Type ObjectType `json:"type"` } // IsBlocking checks if an object is a blocking object func (o *Object) IsBlocking() bool { - var blocking = [...]Type{ + var blocking = [...]ObjectType{ ObjectRover, ObjectLargeRock, } @@ -40,7 +41,7 @@ func (o *Object) IsBlocking() bool { // IsStashable checks if an object is stashable func (o *Object) IsStashable() bool { - var stashable = [...]Type{ + var stashable = [...]ObjectType{ ObjectSmallRock, } diff --git a/pkg/rove/world.go b/pkg/rove/world.go index 04cad81..177dbba 100644 --- a/pkg/rove/world.go +++ b/pkg/rove/world.go @@ -318,7 +318,7 @@ func (w *World) MoveRover(rover string, b maths.Bearing) (maths.Vector, error) { } // RoverStash will stash an item at the current rovers position -func (w *World) RoverStash(rover string) (atlas.Type, error) { +func (w *World) RoverStash(rover string) (atlas.ObjectType, error) { w.worldMutex.Lock() defer w.worldMutex.Unlock()