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

@ -9,8 +9,6 @@ import (
// ObjectGlyph returns the glyph for this object type
func ObjectGlyph(o roveapi.Object) Glyph {
switch o {
case roveapi.Object_ObjectNone:
return GlyphNone
case roveapi.Object_RoverLive:
return GlyphRoverLive
case roveapi.Object_RockSmall:
@ -20,7 +18,7 @@ func ObjectGlyph(o roveapi.Object) Glyph {
}
log.Fatalf("Unknown object type: %c", o)
return GlyphNone
return 0
}
// Object represents an object in the world