Refactor so Rover's aren't in the atlas
This commit is contained in:
parent
ccd9e13c51
commit
5c12fabb63
5 changed files with 51 additions and 43 deletions
|
@ -1,9 +1,23 @@
|
|||
package atlas
|
||||
|
||||
const (
|
||||
TileEmpty = byte(0)
|
||||
TileRover = byte(1)
|
||||
|
||||
TileWall = byte(2)
|
||||
TileRock = byte(3)
|
||||
TileEmpty = byte(' ')
|
||||
TileRover = byte('R')
|
||||
TileSmallRock = byte('o')
|
||||
TileLargeRock = byte('O')
|
||||
)
|
||||
|
||||
// BlockingTiles describes any tiles that block
|
||||
var BlockingTiles = [...]byte{
|
||||
TileLargeRock,
|
||||
}
|
||||
|
||||
// Check if a tile is a blocking tile
|
||||
func IsBlocking(tile byte) bool {
|
||||
for _, t := range BlockingTiles {
|
||||
if tile == t {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue