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

@ -287,12 +287,10 @@ func InnerMain(command string, args ...string) error {
for i := 0; i < num; i++ { for i := 0; i < num; i++ {
t := response.Tiles[i+num*j] t := response.Tiles[i+num*j]
o := response.Objects[i+num*j] o := response.Objects[i+num*j]
if o != roveapi.Object_ObjectNone { if o != roveapi.Object_ObjectUnknown {
fmt.Printf("%c", atlas.ObjectGlyph(o)) fmt.Printf("%c", atlas.ObjectGlyph(o))
} else if t != roveapi.Tile_TileNone {
fmt.Printf("%c", atlas.TileGlyph(t))
} else { } else {
fmt.Printf(" ") fmt.Printf("%c", atlas.TileGlyph(t))
} }
} }

View file

@ -10,8 +10,6 @@ import (
// TileGlyph returns the glyph for this tile type // TileGlyph returns the glyph for this tile type
func TileGlyph(t roveapi.Tile) Glyph { func TileGlyph(t roveapi.Tile) Glyph {
switch t { switch t {
case roveapi.Tile_TileNone:
return GlyphNone
case roveapi.Tile_Rock: case roveapi.Tile_Rock:
return GlyphGroundRock return GlyphGroundRock
case roveapi.Tile_Gravel: case roveapi.Tile_Gravel:
@ -21,7 +19,7 @@ func TileGlyph(t roveapi.Tile) Glyph {
} }
log.Fatalf("Unknown tile type: %c", t) log.Fatalf("Unknown tile type: %c", t)
return GlyphNone return 0
} }
// Atlas represents a 2D world atlas of tiles and objects // Atlas represents a 2D world atlas of tiles and objects

View file

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

View file

@ -121,14 +121,14 @@ func (a *chunkBasedAtlas) populate(chunk int) {
// Get the object noise value for this location // Get the object noise value for this location
o := a.objectNoise.Eval2(float64(origin.X+i)/objectNoiseScale, float64(origin.Y+j)/objectNoiseScale) o := a.objectNoise.Eval2(float64(origin.X+i)/objectNoiseScale, float64(origin.Y+j)/objectNoiseScale)
var obj = roveapi.Object_ObjectNone var obj = roveapi.Object_ObjectUnknown
switch { switch {
case o > 0.6: case o > 0.6:
obj = roveapi.Object_RockLarge obj = roveapi.Object_RockLarge
case o > 0.5: case o > 0.5:
obj = roveapi.Object_RockSmall obj = roveapi.Object_RockSmall
} }
if obj != roveapi.Object_ObjectNone { if obj != roveapi.Object_ObjectUnknown {
c.Objects[j*a.ChunkSize+i] = Object{Type: roveapi.Object(obj)} c.Objects[j*a.ChunkSize+i] = Object{Type: roveapi.Object(obj)}
} }
} }
@ -160,7 +160,7 @@ func (a *chunkBasedAtlas) setObject(chunk int, local maths.Vector, object Object
c := a.Chunks[chunk] c := a.Chunks[chunk]
i := a.chunkTileIndex(local) i := a.chunkTileIndex(local)
if object.Type != roveapi.Object_ObjectNone { if object.Type != roveapi.Object_ObjectUnknown {
c.Objects[i] = object c.Objects[i] = object
} else { } else {
delete(c.Objects, i) delete(c.Objects, i)

View file

@ -4,9 +4,6 @@ package atlas
type Glyph byte type Glyph byte
const ( const (
// GlyphNone is a keyword for nothing
GlyphNone = Glyph(0)
// GlyphGroundRock is solid rock ground // GlyphGroundRock is solid rock ground
GlyphGroundRock = Glyph('-') GlyphGroundRock = Glyph('-')

View file

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

View file

@ -324,29 +324,29 @@ func (w *World) RoverStash(rover string) (roveapi.Object, error) {
r, ok := w.Rovers[rover] r, ok := w.Rovers[rover]
if !ok { if !ok {
return roveapi.Object_ObjectNone, fmt.Errorf("no rover matching id") return roveapi.Object_ObjectUnknown, fmt.Errorf("no rover matching id")
} }
// Can't pick up when full // Can't pick up when full
if len(r.Inventory) >= r.Capacity { if len(r.Inventory) >= r.Capacity {
return roveapi.Object_ObjectNone, nil return roveapi.Object_ObjectUnknown, nil
} }
// Ensure the rover has energy // Ensure the rover has energy
if r.Charge <= 0 { if r.Charge <= 0 {
return roveapi.Object_ObjectNone, nil return roveapi.Object_ObjectUnknown, nil
} }
r.Charge-- r.Charge--
_, obj := w.Atlas.QueryPosition(r.Pos) _, obj := w.Atlas.QueryPosition(r.Pos)
if !obj.IsStashable() { if !obj.IsStashable() {
return roveapi.Object_ObjectNone, nil return roveapi.Object_ObjectUnknown, nil
} }
r.AddLogEntryf("stashed %c", obj.Type) r.AddLogEntryf("stashed %c", obj.Type)
r.Inventory = append(r.Inventory, obj) r.Inventory = append(r.Inventory, obj)
w.Rovers[rover] = r w.Rovers[rover] = r
w.Atlas.SetObject(r.Pos, atlas.Object{Type: roveapi.Object_ObjectNone}) w.Atlas.SetObject(r.Pos, atlas.Object{Type: roveapi.Object_ObjectUnknown})
return obj.Type, nil return obj.Type, nil
} }

View file

@ -142,13 +142,10 @@ func TestWorld_RoverStash(t *testing.T) {
Y: 0.0, Y: 0.0,
} }
world.Atlas.SetObject(pos, atlas.Object{Type: roveapi.Object_ObjectNone}) world.Atlas.SetObject(pos, atlas.Object{Type: roveapi.Object_ObjectUnknown})
err = world.WarpRover(a, pos) err = world.WarpRover(a, pos)
assert.NoError(t, err, "Failed to set position for rover") assert.NoError(t, err, "Failed to set position for rover")
// Set to a traversible tile
world.Atlas.SetTile(pos, roveapi.Tile_TileNone)
rover, err := world.GetRover(a) rover, err := world.GetRover(a)
assert.NoError(t, err, "Failed to get rover") assert.NoError(t, err, "Failed to get rover")
@ -163,7 +160,7 @@ func TestWorld_RoverStash(t *testing.T) {
// Check it's gone // Check it's gone
_, obj := world.Atlas.QueryPosition(pos) _, obj := world.Atlas.QueryPosition(pos)
assert.Equal(t, roveapi.Object_ObjectNone, obj.Type, "Stash failed to remove object from atlas") assert.Equal(t, roveapi.Object_ObjectUnknown, obj.Type, "Stash failed to remove object from atlas")
// Check we have it // Check we have it
inv, err := world.RoverInventory(a) inv, err := world.RoverInventory(a)
@ -191,7 +188,7 @@ func TestWorld_RoverStash(t *testing.T) {
// Try to pick it up // Try to pick it up
o, err := world.RoverStash(a) o, err := world.RoverStash(a)
assert.NoError(t, err, "Failed to stash") assert.NoError(t, err, "Failed to stash")
assert.Equal(t, roveapi.Object_ObjectNone, o, "Failed to get correct object") assert.Equal(t, roveapi.Object_ObjectUnknown, o, "Failed to get correct object")
// Check it's still there // Check it's still there
_, obj := world.Atlas.QueryPosition(pos) _, obj := world.Atlas.QueryPosition(pos)
@ -246,8 +243,7 @@ func TestWorld_RoverRepair(t *testing.T) {
Y: 0.0, Y: 0.0,
} }
world.Atlas.SetTile(pos, roveapi.Tile_TileNone) world.Atlas.SetObject(pos, atlas.Object{Type: roveapi.Object_ObjectUnknown})
world.Atlas.SetObject(pos, atlas.Object{Type: roveapi.Object_ObjectNone})
err = world.WarpRover(a, pos) err = world.WarpRover(a, pos)
assert.NoError(t, err, "Failed to set position for rover") assert.NoError(t, err, "Failed to set position for rover")
@ -312,7 +308,7 @@ func TestWorld_Charge(t *testing.T) {
// Ensure the path ahead is empty // Ensure the path ahead is empty
world.Atlas.SetTile(initialPos.Added(maths.North.Vector()), roveapi.Tile_Rock) world.Atlas.SetTile(initialPos.Added(maths.North.Vector()), roveapi.Tile_Rock)
world.Atlas.SetObject(initialPos.Added(maths.North.Vector()), atlas.Object{Type: roveapi.Object_ObjectNone}) world.Atlas.SetObject(initialPos.Added(maths.North.Vector()), atlas.Object{Type: roveapi.Object_ObjectUnknown})
// Try and move north (along unblocked path) // Try and move north (along unblocked path)
newPos, err := world.MoveRover(a, maths.North) newPos, err := world.MoveRover(a, maths.North)
@ -394,7 +390,7 @@ func TestWorld_Broadcast(t *testing.T) {
assert.Contains(t, rb.Logs[len(rb.Logs)-1].Text, "ABC", "Rover A should have logged it's broadcast") assert.Contains(t, rb.Logs[len(rb.Logs)-1].Text, "ABC", "Rover A should have logged it's broadcast")
// Warp B outside of the range of A // Warp B outside of the range of A
world.Atlas.SetObject(maths.Vector{X: ra.Range, Y: 0}, atlas.Object{Type: roveapi.Object_ObjectNone}) world.Atlas.SetObject(maths.Vector{X: ra.Range, Y: 0}, atlas.Object{Type: roveapi.Object_ObjectUnknown})
assert.NoError(t, world.WarpRover(b, maths.Vector{X: ra.Range, Y: 0})) assert.NoError(t, world.WarpRover(b, maths.Vector{X: ra.Range, Y: 0}))
// Broadcast from a again // Broadcast from a again
@ -411,7 +407,7 @@ func TestWorld_Broadcast(t *testing.T) {
assert.Contains(t, rb.Logs[len(rb.Logs)-1].Text, "XYZ", "Rover A should have logged it's broadcast") assert.Contains(t, rb.Logs[len(rb.Logs)-1].Text, "XYZ", "Rover A should have logged it's broadcast")
// Warp B outside of the range of A // Warp B outside of the range of A
world.Atlas.SetObject(maths.Vector{X: ra.Range + 1, Y: 0}, atlas.Object{Type: roveapi.Object_ObjectNone}) world.Atlas.SetObject(maths.Vector{X: ra.Range + 1, Y: 0}, atlas.Object{Type: roveapi.Object_ObjectUnknown})
assert.NoError(t, world.WarpRover(b, maths.Vector{X: ra.Range + 1, Y: 0})) assert.NoError(t, world.WarpRover(b, maths.Vector{X: ra.Range + 1, Y: 0}))
// Broadcast from a again // Broadcast from a again

View file

@ -102,8 +102,8 @@ func (CommandType) EnumDescriptor() ([]byte, []int) {
type Object int32 type Object int32
const ( const (
// ObjectNone represents no object at all // ObjectUnknown represents no object at all
Object_ObjectNone Object = 0 Object_ObjectUnknown Object = 0
// RoverLive represents a live rover // RoverLive represents a live rover
Object_RoverLive Object = 1 Object_RoverLive Object = 1
// RockSmall is a small stashable rock // RockSmall is a small stashable rock
@ -115,16 +115,16 @@ const (
// Enum value maps for Object. // Enum value maps for Object.
var ( var (
Object_name = map[int32]string{ Object_name = map[int32]string{
0: "ObjectNone", 0: "ObjectUnknown",
1: "RoverLive", 1: "RoverLive",
2: "RockSmall", 2: "RockSmall",
3: "RockLarge", 3: "RockLarge",
} }
Object_value = map[string]int32{ Object_value = map[string]int32{
"ObjectNone": 0, "ObjectUnknown": 0,
"RoverLive": 1, "RoverLive": 1,
"RockSmall": 2, "RockSmall": 2,
"RockLarge": 3, "RockLarge": 3,
} }
) )
@ -158,8 +158,8 @@ func (Object) EnumDescriptor() ([]byte, []int) {
type Tile int32 type Tile int32
const ( const (
// TileNone is a keyword for nothing // TileUnknown is a keyword for nothing
Tile_TileNone Tile = 0 Tile_TileUnknown Tile = 0
// Rock is solid rock ground // Rock is solid rock ground
Tile_Rock Tile = 1 Tile_Rock Tile = 1
// Gravel is loose rocks // Gravel is loose rocks
@ -171,16 +171,16 @@ const (
// Enum value maps for Tile. // Enum value maps for Tile.
var ( var (
Tile_name = map[int32]string{ Tile_name = map[int32]string{
0: "TileNone", 0: "TileUnknown",
1: "Rock", 1: "Rock",
2: "Gravel", 2: "Gravel",
3: "Sand", 3: "Sand",
} }
Tile_value = map[string]int32{ Tile_value = map[string]int32{
"TileNone": 0, "TileUnknown": 0,
"Rock": 1, "Rock": 1,
"Gravel": 2, "Gravel": 2,
"Sand": 3, "Sand": 3,
} }
) )
@ -1207,39 +1207,39 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{
0x01, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x73, 0x68, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x73, 0x68, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06,
0x72, 0x65, 0x70, 0x61, 0x69, 0x72, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x68, 0x72, 0x65, 0x70, 0x61, 0x69, 0x72, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x68,
0x61, 0x72, 0x67, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x72, 0x67, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63,
0x61, 0x73, 0x74, 0x10, 0x05, 0x2a, 0x45, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x61, 0x73, 0x74, 0x10, 0x05, 0x2a, 0x48, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
0x0e, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0d, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x65, 0x10,
0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x10, 0x02,
0x09, 0x52, 0x6f, 0x63, 0x6b, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x03, 0x2a, 0x34, 0x0a, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x03, 0x2a,
0x54, 0x69, 0x6c, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x65, 0x37, 0x0a, 0x04, 0x54, 0x69, 0x6c, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x69, 0x6c, 0x65, 0x55,
0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x6f, 0x63, 0x6b, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x6f, 0x63, 0x6b,
0x47, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x61, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x10, 0x02, 0x12, 0x08,
0x10, 0x03, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x0a, 0x04, 0x53, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76,
0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75,
0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1d, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x52, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x12, 0x41, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72,
0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52,
0x1a, 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69,
0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17,
0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70,
0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x05, 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72,
0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75,
0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a,
0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70,
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69,
0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61,
0x6f, 0x74, 0x6f, 0x33, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View file

@ -136,8 +136,8 @@ message CommandResponse {}
// Types of objects // Types of objects
enum Object { enum Object {
// ObjectNone represents no object at all // ObjectUnknown represents no object at all
ObjectNone = 0; ObjectUnknown = 0;
// RoverLive represents a live rover // RoverLive represents a live rover
RoverLive = 1; RoverLive = 1;
@ -150,8 +150,8 @@ enum Object {
} }
enum Tile { enum Tile {
// TileNone is a keyword for nothing // TileUnknown is a keyword for nothing
TileNone = 0; TileUnknown = 0;
// Rock is solid rock ground // Rock is solid rock ground
Rock = 1; Rock = 1;