Fix up the concept of "None" tiles and objects

Replace with "Unknown" which is effectively an invalid value
This commit is contained in:
Marc Di Luzio 2020-07-19 12:33:11 +01:00
parent 305f64ec38
commit 7bdfa44fb6
10 changed files with 72 additions and 87 deletions

View file

@ -260,12 +260,10 @@ func TestAtlas_WorldGen(t *testing.T) {
for j := num - 1; j >= 0; j-- {
for i := 0; i < num; i++ {
t, o := a.QueryPosition(maths.Vector{X: i, Y: j})
if o.Type != roveapi.Object_ObjectNone {
if o.Type != roveapi.Object_ObjectUnknown {
fmt.Printf("%c", ObjectGlyph(o.Type))
} else if t != roveapi.Tile_TileNone {
fmt.Printf("%c", TileGlyph(t))
} else {
fmt.Printf(" ")
fmt.Printf("%c", TileGlyph(t))
}
}