Convert tiles and object types to typed consts
This commit is contained in:
parent
7e41ac0028
commit
24d4fe9273
2 changed files with 8 additions and 8 deletions
|
@ -11,16 +11,16 @@ type Tile byte
|
|||
|
||||
const (
|
||||
// TileNone is a keyword for nothing
|
||||
TileNone = iota
|
||||
TileNone = Tile(0)
|
||||
|
||||
// TileRock is solid rock ground
|
||||
TileRock
|
||||
TileRock = Tile(1)
|
||||
|
||||
// TileGravel is loose rocks
|
||||
TileGravel
|
||||
TileGravel = Tile(2)
|
||||
|
||||
// TileSand is sand
|
||||
TileSand
|
||||
TileSand = Tile(3)
|
||||
)
|
||||
|
||||
// Glyph returns the glyph for this tile type
|
||||
|
|
|
@ -8,16 +8,16 @@ type ObjectType byte
|
|||
// Types of objects
|
||||
const (
|
||||
// ObjectNone represents no object at all
|
||||
ObjectNone = iota
|
||||
ObjectNone = ObjectType(0)
|
||||
|
||||
// ObjectRover represents a live rover
|
||||
ObjectRoverLive
|
||||
ObjectRoverLive = ObjectType(1)
|
||||
|
||||
// ObjectSmallRock is a small stashable rock
|
||||
ObjectRockSmall
|
||||
ObjectRockSmall = ObjectType(2)
|
||||
|
||||
// ObjectLargeRock is a large blocking rock
|
||||
ObjectRockLarge
|
||||
ObjectRockLarge = ObjectType(3)
|
||||
)
|
||||
|
||||
// Glyph returns the glyph for this object type
|
||||
|
|
Loading…
Add table
Reference in a new issue