From 70f041ae5d16686b65ffb77c9528b216d19c4310 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 1 Aug 2020 11:09:15 +0100 Subject: [PATCH 01/10] Spawn rover parts in the world --- pkg/rove/worldgen.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkg/rove/worldgen.go b/pkg/rove/worldgen.go index dd864b8..a1593c6 100644 --- a/pkg/rove/worldgen.go +++ b/pkg/rove/worldgen.go @@ -35,6 +35,7 @@ func NewNoiseWorldGen(seed int64) WorldGen { const ( terrainNoiseScale = 15 rockNoiseScale = 3 + partsNoiseScale = 2 ) // GetTile returns the chosen tile at a location @@ -52,12 +53,21 @@ func (g *NoiseWorldGen) GetTile(v maths.Vector) roveapi.Tile { // GetObject returns the chosen object at a location func (g *NoiseWorldGen) GetObject(v maths.Vector) (obj Object) { - o := g.noise.Eval2(float64(v.X)/rockNoiseScale, float64(v.Y)/rockNoiseScale) + r := g.noise.Eval2(float64(v.X)/rockNoiseScale, float64(v.Y)/rockNoiseScale) switch { - case o > 0.6: + // Prioritise rocks + case r > 0.6: obj.Type = roveapi.Object_RockLarge - case o > 0.5: + case r > 0.5: obj.Type = roveapi.Object_RockSmall + + default: + // Otherwise, try some rover parts + p := g.noise.Eval2(float64(v.X)/partsNoiseScale, float64(v.Y)/partsNoiseScale) + switch { + case p > 0.8: + obj.Type = roveapi.Object_RoverParts + } } // Very rarely spawn a dormant rover From e66b899e2aef8ce5299dc01b589da760a8e9e6fb Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 1 Aug 2020 11:09:41 +0100 Subject: [PATCH 02/10] Increase the base rover range to 10 --- pkg/rove/rover.go | 2 +- pkg/rove/world_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/rove/rover.go b/pkg/rove/rover.go index d0fb9cb..bebde50 100644 --- a/pkg/rove/rover.go +++ b/pkg/rove/rover.go @@ -74,7 +74,7 @@ type Rover struct { // DefaultRover returns a default rover object with default settings func DefaultRover() *Rover { return &Rover{ - Range: 4, + Range: 10, Integrity: 10, MaximumIntegrity: 10, Capacity: 10, diff --git a/pkg/rove/world_test.go b/pkg/rove/world_test.go index afc8f53..f085d89 100644 --- a/pkg/rove/world_test.go +++ b/pkg/rove/world_test.go @@ -109,15 +109,16 @@ func TestWorld_RadarFromRover(t *testing.T) { world.Atlas.SetObject(maths.Vector{X: 0, Y: 0}, Object{Type: roveapi.Object_ObjectUnknown}) assert.NoError(t, world.WarpRover(a, maths.Vector{X: 0, Y: 0}), "Failed to warp rover") + r, err := world.GetRover(a) + assert.NoError(t, err) + radar, objs, err := world.RadarFromRover(a) assert.NoError(t, err, "Failed to get radar from rover") - fullRange := 4 + 4 + 1 + fullRange := r.Range + r.Range + 1 assert.Equal(t, fullRange*fullRange, len(radar), "Radar returned wrong length") assert.Equal(t, fullRange*fullRange, len(objs), "Radar returned wrong length") - // Test the expected values - assert.Equal(t, roveapi.Object_RoverLive, objs[1+fullRange]) - assert.Equal(t, roveapi.Object_RoverLive, objs[4+4*fullRange]) + // TODO: Verify the other rover is on the radar // Check the radar results are stable radar1, objs1, err := world.RadarFromRover(a) From 018c122861f7a1536b3fe8ee754dfd1c2207a477 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 1 Aug 2020 11:24:53 +0100 Subject: [PATCH 03/10] Stop spawning dormant rovers in the world --- pkg/rove/worldgen.go | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/pkg/rove/worldgen.go b/pkg/rove/worldgen.go index a1593c6..2abb447 100644 --- a/pkg/rove/worldgen.go +++ b/pkg/rove/worldgen.go @@ -1,10 +1,6 @@ package rove import ( - "encoding/json" - "log" - "math/rand" - "github.com/mdiluz/rove/pkg/maths" "github.com/mdiluz/rove/proto/roveapi" "github.com/ojrac/opensimplex-go" @@ -70,41 +66,5 @@ func (g *NoiseWorldGen) GetObject(v maths.Vector) (obj Object) { } } - // Very rarely spawn a dormant rover - if obj.Type == roveapi.Object_ObjectUnknown { - // TODO: Make this better, ideally with noise - if v.X%25 == 0 && v.Y%25 == 0 && v.X != 0 && v.Y != 0 { - obj.Type = roveapi.Object_RoverDormant - } - } - - // Post process any spawned objects - switch obj.Type { - case roveapi.Object_RoverDormant: - // Create the rover - r := DefaultRover() - - // Set the rover variables - r.Pos = v - - // Upgrade this rover randomly - r.MaximumCharge += rand.Int() % 3 - r.MaximumIntegrity += rand.Int() % 3 - r.Capacity += rand.Int() % 3 - r.Range += rand.Int() % 3 - - // For now, mark the log as corrupted - r.AddLogEntryf("log corrupted") - - // Marshal the rover data into the object data - b, err := json.Marshal(r) - if err != nil { - log.Fatalf("couldn't marshal rover, should never fail: %s", err) - } - - // Store the bytes - obj.Data = b - } - return obj } From 636f0ed7734cc3642eac9b9bda9e807c00a91ede Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sat, 1 Aug 2020 11:26:10 +0100 Subject: [PATCH 04/10] Spawn rover parts a little more frequently --- pkg/rove/worldgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rove/worldgen.go b/pkg/rove/worldgen.go index 2abb447..6cb425f 100644 --- a/pkg/rove/worldgen.go +++ b/pkg/rove/worldgen.go @@ -61,7 +61,7 @@ func (g *NoiseWorldGen) GetObject(v maths.Vector) (obj Object) { // Otherwise, try some rover parts p := g.noise.Eval2(float64(v.X)/partsNoiseScale, float64(v.Y)/partsNoiseScale) switch { - case p > 0.8: + case p > 0.7: obj.Type = roveapi.Object_RoverParts } } From 6a44633d40ae92c0c66e2baecae387ec9a9762ab Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 11:28:14 +0100 Subject: [PATCH 05/10] Add rover parts to the cmdline pretty printer --- cmd/rove/internal/glyph.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/rove/internal/glyph.go b/cmd/rove/internal/glyph.go index eac12c0..4a774e7 100644 --- a/cmd/rove/internal/glyph.go +++ b/cmd/rove/internal/glyph.go @@ -25,6 +25,9 @@ const ( // GlyphRoverDormant represents a dormant rover GlyphRoverDormant = Glyph('r') + // GlyphRoverParts represents spare rover parts + GlyphRoverParts = Glyph('*') + // GlyphRockSmall is a small stashable rock GlyphRockSmall = Glyph('o') @@ -58,6 +61,8 @@ func ObjectGlyph(o roveapi.Object) Glyph { return GlyphRoverDormant case roveapi.Object_RockLarge: return GlyphRockLarge + case roveapi.Object_RoverParts: + return GlyphRoverParts } log.Fatalf("Unknown object type: %c", o) From 1200b0a2a2361e6ea26ff036367796b33c910868 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 11:39:28 +0100 Subject: [PATCH 06/10] Add "upgrade" command to use the rover parts --- proto/roveapi/roveapi.pb.go | 526 +++++++++++++++++++++--------------- proto/roveapi/roveapi.proto | 44 ++- 2 files changed, 333 insertions(+), 237 deletions(-) diff --git a/proto/roveapi/roveapi.pb.go b/proto/roveapi/roveapi.pb.go index 753c058..81a6cb5 100644 --- a/proto/roveapi/roveapi.pb.go +++ b/proto/roveapi/roveapi.pb.go @@ -39,47 +39,51 @@ type CommandType int32 const ( CommandType_none CommandType = 0 - // Toggles the sails, either catching the wind, or charging from the sun - CommandType_toggle CommandType = 1 - // Turns the rover in the specified bearing (requires bearing) - CommandType_turn CommandType = 2 - // Stashes item at current location in rover inventory - CommandType_stash CommandType = 3 - // Repairs the rover using an inventory object - CommandType_repair CommandType = 4 - // Broadcasts a message to nearby rovers (requires data) - CommandType_broadcast CommandType = 5 - // Salvages a neighboring dormant rover for parts - CommandType_salvage CommandType = 6 - // Transfers remote control into dormant rover - CommandType_transfer CommandType = 7 // Waits before performing the next command - CommandType_wait CommandType = 8 + CommandType_wait CommandType = 1 + // Toggles the sails, either catching the wind, or charging from the sun + CommandType_toggle CommandType = 2 + // Turns the rover in the specified bearing (requires bearing) + CommandType_turn CommandType = 3 + // Stashes item at current location in rover inventory + CommandType_stash CommandType = 4 + // Repairs the rover using an inventory object + CommandType_repair CommandType = 5 + // Broadcasts a message to nearby rovers (requires data) + CommandType_broadcast CommandType = 6 + // Salvages a neighboring dormant rover for parts + CommandType_salvage CommandType = 7 + // Transfers remote control into dormant rover + CommandType_transfer CommandType = 8 + // Upgrades a chosen rover specification using 5 rover parts + CommandType_upgrade CommandType = 9 ) // Enum value maps for CommandType. var ( CommandType_name = map[int32]string{ 0: "none", - 1: "toggle", - 2: "turn", - 3: "stash", - 4: "repair", - 5: "broadcast", - 6: "salvage", - 7: "transfer", - 8: "wait", + 1: "wait", + 2: "toggle", + 3: "turn", + 4: "stash", + 5: "repair", + 6: "broadcast", + 7: "salvage", + 8: "transfer", + 9: "upgrade", } CommandType_value = map[string]int32{ "none": 0, - "toggle": 1, - "turn": 2, - "stash": 3, - "repair": 4, - "broadcast": 5, - "salvage": 6, - "transfer": 7, - "wait": 8, + "wait": 1, + "toggle": 2, + "turn": 3, + "stash": 4, + "repair": 5, + "broadcast": 6, + "salvage": 7, + "transfer": 8, + "upgrade": 9, } ) @@ -179,6 +183,62 @@ func (Bearing) EnumDescriptor() ([]byte, []int) { return file_roveapi_roveapi_proto_rawDescGZIP(), []int{1} } +// Describes the type of upgrade +type RoverUpgrade int32 + +const ( + RoverUpgrade_RoverUpgradeUnknown RoverUpgrade = 0 + RoverUpgrade_Range RoverUpgrade = 1 + RoverUpgrade_Capacity RoverUpgrade = 2 + RoverUpgrade_MaximumIntegrity RoverUpgrade = 3 + RoverUpgrade_MaximumCharge RoverUpgrade = 4 +) + +// Enum value maps for RoverUpgrade. +var ( + RoverUpgrade_name = map[int32]string{ + 0: "RoverUpgradeUnknown", + 1: "Range", + 2: "Capacity", + 3: "MaximumIntegrity", + 4: "MaximumCharge", + } + RoverUpgrade_value = map[string]int32{ + "RoverUpgradeUnknown": 0, + "Range": 1, + "Capacity": 2, + "MaximumIntegrity": 3, + "MaximumCharge": 4, + } +) + +func (x RoverUpgrade) Enum() *RoverUpgrade { + p := new(RoverUpgrade) + *p = x + return p +} + +func (x RoverUpgrade) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RoverUpgrade) Descriptor() protoreflect.EnumDescriptor { + return file_roveapi_roveapi_proto_enumTypes[2].Descriptor() +} + +func (RoverUpgrade) Type() protoreflect.EnumType { + return &file_roveapi_roveapi_proto_enumTypes[2] +} + +func (x RoverUpgrade) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RoverUpgrade.Descriptor instead. +func (RoverUpgrade) EnumDescriptor() ([]byte, []int) { + return file_roveapi_roveapi_proto_rawDescGZIP(), []int{2} +} + // Types of objects type Object int32 @@ -229,11 +289,11 @@ func (x Object) String() string { } func (Object) Descriptor() protoreflect.EnumDescriptor { - return file_roveapi_roveapi_proto_enumTypes[2].Descriptor() + return file_roveapi_roveapi_proto_enumTypes[3].Descriptor() } func (Object) Type() protoreflect.EnumType { - return &file_roveapi_roveapi_proto_enumTypes[2] + return &file_roveapi_roveapi_proto_enumTypes[3] } func (x Object) Number() protoreflect.EnumNumber { @@ -242,7 +302,7 @@ func (x Object) Number() protoreflect.EnumNumber { // Deprecated: Use Object.Descriptor instead. func (Object) EnumDescriptor() ([]byte, []int) { - return file_roveapi_roveapi_proto_rawDescGZIP(), []int{2} + return file_roveapi_roveapi_proto_rawDescGZIP(), []int{3} } type Tile int32 @@ -285,11 +345,11 @@ func (x Tile) String() string { } func (Tile) Descriptor() protoreflect.EnumDescriptor { - return file_roveapi_roveapi_proto_enumTypes[3].Descriptor() + return file_roveapi_roveapi_proto_enumTypes[4].Descriptor() } func (Tile) Type() protoreflect.EnumType { - return &file_roveapi_roveapi_proto_enumTypes[3] + return &file_roveapi_roveapi_proto_enumTypes[4] } func (x Tile) Number() protoreflect.EnumNumber { @@ -298,7 +358,7 @@ func (x Tile) Number() protoreflect.EnumNumber { // Deprecated: Use Tile.Descriptor instead. func (Tile) EnumDescriptor() ([]byte, []int) { - return file_roveapi_roveapi_proto_rawDescGZIP(), []int{3} + return file_roveapi_roveapi_proto_rawDescGZIP(), []int{4} } // SailPosition represents the position of the sola sail @@ -337,11 +397,11 @@ func (x SailPosition) String() string { } func (SailPosition) Descriptor() protoreflect.EnumDescriptor { - return file_roveapi_roveapi_proto_enumTypes[4].Descriptor() + return file_roveapi_roveapi_proto_enumTypes[5].Descriptor() } func (SailPosition) Type() protoreflect.EnumType { - return &file_roveapi_roveapi_proto_enumTypes[4] + return &file_roveapi_roveapi_proto_enumTypes[5] } func (x SailPosition) Number() protoreflect.EnumNumber { @@ -350,7 +410,7 @@ func (x SailPosition) Number() protoreflect.EnumNumber { // Deprecated: Use SailPosition.Descriptor instead. func (SailPosition) EnumDescriptor() ([]byte, []int) { - return file_roveapi_roveapi_proto_rawDescGZIP(), []int{4} + return file_roveapi_roveapi_proto_rawDescGZIP(), []int{5} } // ServerStatusRequest is an empty placeholder @@ -648,6 +708,8 @@ type Command struct { Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // move - the bearing for the rover to turn to Bearing Bearing `protobuf:"varint,4,opt,name=bearing,proto3,enum=roveapi.Bearing" json:"bearing,omitempty"` + // upgrade - the upgrade to apply to the rover + Upgrade RoverUpgrade `protobuf:"varint,5,opt,name=upgrade,proto3,enum=roveapi.RoverUpgrade" json:"upgrade,omitempty"` } func (x *Command) Reset() { @@ -710,6 +772,13 @@ func (x *Command) GetBearing() Bearing { return Bearing_BearingUnknown } +func (x *Command) GetUpgrade() RoverUpgrade { + if x != nil { + return x.Upgrade + } + return RoverUpgrade_RoverUpgradeUnknown +} + // CommandRequest describes a set of commands to be requested for the rover type CommandRequest struct { state protoimpl.MessageState @@ -1423,7 +1492,7 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{ 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x07, 0x43, 0x6f, + 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc2, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x63, 0x6f, @@ -1432,137 +1501,148 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{ 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x65, 0x61, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x6a, 0x0a, - 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, - 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x0c, - 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x75, 0x0a, 0x0d, 0x52, 0x61, 0x64, 0x61, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x23, 0x0a, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, - 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x74, - 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, - 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, - 0x3b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x0a, + 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, + 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x6a, + 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x03, - 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x24, 0x0a, 0x06, 0x56, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, - 0x79, 0x22, 0xad, 0x01, 0x0a, 0x13, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, - 0x2a, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x69, 0x6d, - 0x75, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x6d, - 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x67, - 0x65, 0x22, 0x82, 0x02, 0x0a, 0x0b, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x65, 0x61, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x39, 0x0a, - 0x0c, 0x73, 0x61, 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x61, - 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x61, 0x69, 0x6c, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x0e, - 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x72, 0x6f, 0x76, - 0x65, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x04, 0x77, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x08, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, + 0x0c, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x75, 0x0a, 0x0d, 0x52, 0x61, 0x64, + 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x23, 0x0a, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x0d, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x69, 0x6c, 0x65, 0x52, 0x05, + 0x74, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x22, 0x3b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2d, 0x0a, + 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x24, 0x0a, 0x06, + 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x01, 0x79, 0x22, 0xad, 0x01, 0x0a, 0x13, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, + 0x12, 0x2a, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x24, 0x0a, 0x0d, + 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x72, + 0x67, 0x65, 0x22, 0x82, 0x02, 0x0a, 0x0b, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x65, - 0x61, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x77, 0x69, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x6c, - 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x6f, 0x76, 0x65, - 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0xa4, 0x01, - 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x30, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x73, 0x70, - 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x76, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x2a, 0x78, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x74, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x74, 0x75, 0x72, - 0x6e, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x73, 0x68, 0x10, 0x03, 0x12, 0x0a, - 0x0a, 0x06, 0x72, 0x65, 0x70, 0x61, 0x69, 0x72, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x61, 0x6c, - 0x76, 0x61, 0x67, 0x65, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x10, 0x08, 0x2a, 0x83, - 0x01, 0x0a, 0x07, 0x42, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x65, - 0x61, 0x72, 0x69, 0x6e, 0x67, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, 0x72, - 0x74, 0x68, 0x45, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x61, 0x73, 0x74, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x45, 0x61, 0x73, 0x74, 0x10, - 0x04, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, - 0x53, 0x6f, 0x75, 0x74, 0x68, 0x57, 0x65, 0x73, 0x74, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x57, - 0x65, 0x73, 0x74, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x57, 0x65, - 0x73, 0x74, 0x10, 0x08, 0x2a, 0x6a, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, - 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x65, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, - 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x10, - 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x04, - 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x73, 0x10, 0x05, - 0x2a, 0x37, 0x0a, 0x04, 0x54, 0x69, 0x6c, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x69, 0x6c, 0x65, - 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x6f, 0x63, - 0x6b, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x10, 0x02, 0x12, - 0x08, 0x0a, 0x04, 0x53, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x2a, 0x4c, 0x0a, 0x0c, 0x53, 0x61, 0x69, - 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x57, 0x69, - 0x6e, 0x64, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x6f, 0x6c, 0x61, 0x72, 0x43, 0x68, 0x61, - 0x72, 0x67, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76, 0x65, - 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x41, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x6f, - 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x2e, - 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x6f, - 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, - 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, - 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, - 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x39, + 0x0a, 0x0c, 0x73, 0x61, 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, + 0x61, 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x61, 0x69, + 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x12, 0x38, 0x0a, + 0x0e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x0e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x72, 0x6f, + 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x04, 0x77, 0x69, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x42, + 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x77, 0x69, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x04, + 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x6f, 0x76, + 0x65, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0xa4, + 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x30, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, + 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x72, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2a, 0x85, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x77, 0x61, 0x69, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x6f, 0x67, + 0x67, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x74, 0x75, 0x72, 0x6e, 0x10, 0x03, 0x12, + 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x73, 0x68, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x72, 0x65, + 0x70, 0x61, 0x69, 0x72, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x61, 0x6c, 0x76, 0x61, 0x67, 0x65, + 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x10, 0x08, + 0x12, 0x0b, 0x0a, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x10, 0x09, 0x2a, 0x83, 0x01, + 0x0a, 0x07, 0x42, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x0e, 0x42, 0x65, 0x61, + 0x72, 0x69, 0x6e, 0x67, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, 0x72, 0x74, + 0x68, 0x45, 0x61, 0x73, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x45, 0x61, 0x73, 0x74, 0x10, + 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x45, 0x61, 0x73, 0x74, 0x10, 0x04, + 0x12, 0x09, 0x0a, 0x05, 0x53, 0x6f, 0x75, 0x74, 0x68, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x6f, 0x75, 0x74, 0x68, 0x57, 0x65, 0x73, 0x74, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x65, + 0x73, 0x74, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x57, 0x65, 0x73, + 0x74, 0x10, 0x08, 0x2a, 0x69, 0x0a, 0x0c, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x70, 0x61, 0x63, + 0x69, 0x74, 0x79, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x67, 0x65, 0x10, 0x04, 0x2a, 0x6a, + 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, + 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x6f, + 0x76, 0x65, 0x72, 0x44, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, + 0x52, 0x6f, 0x63, 0x6b, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x52, + 0x6f, 0x63, 0x6b, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x6f, + 0x76, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x73, 0x10, 0x05, 0x2a, 0x37, 0x0a, 0x04, 0x54, 0x69, + 0x6c, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x69, 0x6c, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x6f, 0x63, 0x6b, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x47, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x61, 0x6e, + 0x64, 0x10, 0x03, 0x2a, 0x4c, 0x0a, 0x0c, 0x53, 0x61, 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x61, + 0x69, 0x6c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x43, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x53, 0x6f, 0x6c, 0x61, 0x72, 0x43, 0x68, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x67, 0x10, + 0x02, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x72, 0x6f, 0x76, + 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x07, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, + 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, + 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, + 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, + 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1577,66 +1657,68 @@ func file_roveapi_roveapi_proto_rawDescGZIP() []byte { return file_roveapi_roveapi_proto_rawDescData } -var file_roveapi_roveapi_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_roveapi_roveapi_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_roveapi_roveapi_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_roveapi_roveapi_proto_goTypes = []interface{}{ (CommandType)(0), // 0: roveapi.CommandType (Bearing)(0), // 1: roveapi.Bearing - (Object)(0), // 2: roveapi.Object - (Tile)(0), // 3: roveapi.Tile - (SailPosition)(0), // 4: roveapi.SailPosition - (*ServerStatusRequest)(nil), // 5: roveapi.ServerStatusRequest - (*ServerStatusResponse)(nil), // 6: roveapi.ServerStatusResponse - (*RegisterRequest)(nil), // 7: roveapi.RegisterRequest - (*Account)(nil), // 8: roveapi.Account - (*RegisterResponse)(nil), // 9: roveapi.RegisterResponse - (*Command)(nil), // 10: roveapi.Command - (*CommandRequest)(nil), // 11: roveapi.CommandRequest - (*CommandResponse)(nil), // 12: roveapi.CommandResponse - (*RadarRequest)(nil), // 13: roveapi.RadarRequest - (*RadarResponse)(nil), // 14: roveapi.RadarResponse - (*StatusRequest)(nil), // 15: roveapi.StatusRequest - (*Log)(nil), // 16: roveapi.Log - (*Vector)(nil), // 17: roveapi.Vector - (*RoverSpecifications)(nil), // 18: roveapi.RoverSpecifications - (*RoverStatus)(nil), // 19: roveapi.RoverStatus - (*RoverReadings)(nil), // 20: roveapi.RoverReadings - (*StatusResponse)(nil), // 21: roveapi.StatusResponse + (RoverUpgrade)(0), // 2: roveapi.RoverUpgrade + (Object)(0), // 3: roveapi.Object + (Tile)(0), // 4: roveapi.Tile + (SailPosition)(0), // 5: roveapi.SailPosition + (*ServerStatusRequest)(nil), // 6: roveapi.ServerStatusRequest + (*ServerStatusResponse)(nil), // 7: roveapi.ServerStatusResponse + (*RegisterRequest)(nil), // 8: roveapi.RegisterRequest + (*Account)(nil), // 9: roveapi.Account + (*RegisterResponse)(nil), // 10: roveapi.RegisterResponse + (*Command)(nil), // 11: roveapi.Command + (*CommandRequest)(nil), // 12: roveapi.CommandRequest + (*CommandResponse)(nil), // 13: roveapi.CommandResponse + (*RadarRequest)(nil), // 14: roveapi.RadarRequest + (*RadarResponse)(nil), // 15: roveapi.RadarResponse + (*StatusRequest)(nil), // 16: roveapi.StatusRequest + (*Log)(nil), // 17: roveapi.Log + (*Vector)(nil), // 18: roveapi.Vector + (*RoverSpecifications)(nil), // 19: roveapi.RoverSpecifications + (*RoverStatus)(nil), // 20: roveapi.RoverStatus + (*RoverReadings)(nil), // 21: roveapi.RoverReadings + (*StatusResponse)(nil), // 22: roveapi.StatusResponse } var file_roveapi_roveapi_proto_depIdxs = []int32{ - 8, // 0: roveapi.RegisterResponse.account:type_name -> roveapi.Account + 9, // 0: roveapi.RegisterResponse.account:type_name -> roveapi.Account 0, // 1: roveapi.Command.command:type_name -> roveapi.CommandType 1, // 2: roveapi.Command.bearing:type_name -> roveapi.Bearing - 8, // 3: roveapi.CommandRequest.account:type_name -> roveapi.Account - 10, // 4: roveapi.CommandRequest.commands:type_name -> roveapi.Command - 8, // 5: roveapi.RadarRequest.account:type_name -> roveapi.Account - 3, // 6: roveapi.RadarResponse.tiles:type_name -> roveapi.Tile - 2, // 7: roveapi.RadarResponse.objects:type_name -> roveapi.Object - 8, // 8: roveapi.StatusRequest.account:type_name -> roveapi.Account - 1, // 9: roveapi.RoverStatus.bearing:type_name -> roveapi.Bearing - 4, // 10: roveapi.RoverStatus.sailPosition:type_name -> roveapi.SailPosition - 10, // 11: roveapi.RoverStatus.queuedCommands:type_name -> roveapi.Command - 17, // 12: roveapi.RoverReadings.position:type_name -> roveapi.Vector - 1, // 13: roveapi.RoverReadings.wind:type_name -> roveapi.Bearing - 16, // 14: roveapi.RoverReadings.logs:type_name -> roveapi.Log - 18, // 15: roveapi.StatusResponse.spec:type_name -> roveapi.RoverSpecifications - 19, // 16: roveapi.StatusResponse.status:type_name -> roveapi.RoverStatus - 20, // 17: roveapi.StatusResponse.readings:type_name -> roveapi.RoverReadings - 5, // 18: roveapi.Rove.ServerStatus:input_type -> roveapi.ServerStatusRequest - 7, // 19: roveapi.Rove.Register:input_type -> roveapi.RegisterRequest - 11, // 20: roveapi.Rove.Command:input_type -> roveapi.CommandRequest - 13, // 21: roveapi.Rove.Radar:input_type -> roveapi.RadarRequest - 15, // 22: roveapi.Rove.Status:input_type -> roveapi.StatusRequest - 6, // 23: roveapi.Rove.ServerStatus:output_type -> roveapi.ServerStatusResponse - 9, // 24: roveapi.Rove.Register:output_type -> roveapi.RegisterResponse - 12, // 25: roveapi.Rove.Command:output_type -> roveapi.CommandResponse - 14, // 26: roveapi.Rove.Radar:output_type -> roveapi.RadarResponse - 21, // 27: roveapi.Rove.Status:output_type -> roveapi.StatusResponse - 23, // [23:28] is the sub-list for method output_type - 18, // [18:23] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 2, // 3: roveapi.Command.upgrade:type_name -> roveapi.RoverUpgrade + 9, // 4: roveapi.CommandRequest.account:type_name -> roveapi.Account + 11, // 5: roveapi.CommandRequest.commands:type_name -> roveapi.Command + 9, // 6: roveapi.RadarRequest.account:type_name -> roveapi.Account + 4, // 7: roveapi.RadarResponse.tiles:type_name -> roveapi.Tile + 3, // 8: roveapi.RadarResponse.objects:type_name -> roveapi.Object + 9, // 9: roveapi.StatusRequest.account:type_name -> roveapi.Account + 1, // 10: roveapi.RoverStatus.bearing:type_name -> roveapi.Bearing + 5, // 11: roveapi.RoverStatus.sailPosition:type_name -> roveapi.SailPosition + 11, // 12: roveapi.RoverStatus.queuedCommands:type_name -> roveapi.Command + 18, // 13: roveapi.RoverReadings.position:type_name -> roveapi.Vector + 1, // 14: roveapi.RoverReadings.wind:type_name -> roveapi.Bearing + 17, // 15: roveapi.RoverReadings.logs:type_name -> roveapi.Log + 19, // 16: roveapi.StatusResponse.spec:type_name -> roveapi.RoverSpecifications + 20, // 17: roveapi.StatusResponse.status:type_name -> roveapi.RoverStatus + 21, // 18: roveapi.StatusResponse.readings:type_name -> roveapi.RoverReadings + 6, // 19: roveapi.Rove.ServerStatus:input_type -> roveapi.ServerStatusRequest + 8, // 20: roveapi.Rove.Register:input_type -> roveapi.RegisterRequest + 12, // 21: roveapi.Rove.Command:input_type -> roveapi.CommandRequest + 14, // 22: roveapi.Rove.Radar:input_type -> roveapi.RadarRequest + 16, // 23: roveapi.Rove.Status:input_type -> roveapi.StatusRequest + 7, // 24: roveapi.Rove.ServerStatus:output_type -> roveapi.ServerStatusResponse + 10, // 25: roveapi.Rove.Register:output_type -> roveapi.RegisterResponse + 13, // 26: roveapi.Rove.Command:output_type -> roveapi.CommandResponse + 15, // 27: roveapi.Rove.Radar:output_type -> roveapi.RadarResponse + 22, // 28: roveapi.Rove.Status:output_type -> roveapi.StatusResponse + 24, // [24:29] is the sub-list for method output_type + 19, // [19:24] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_roveapi_roveapi_proto_init() } @@ -1855,7 +1937,7 @@ func file_roveapi_roveapi_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_roveapi_roveapi_proto_rawDesc, - NumEnums: 5, + NumEnums: 6, NumMessages: 17, NumExtensions: 0, NumServices: 1, diff --git a/proto/roveapi/roveapi.proto b/proto/roveapi/roveapi.proto index 9aad682..72a1fc2 100644 --- a/proto/roveapi/roveapi.proto +++ b/proto/roveapi/roveapi.proto @@ -89,22 +89,24 @@ message RegisterResponse { // CommandType defines the type of a command to give to the rover enum CommandType { none = 0; - // Toggles the sails, either catching the wind, or charging from the sun - toggle = 1; - // Turns the rover in the specified bearing (requires bearing) - turn = 2; - // Stashes item at current location in rover inventory - stash = 3; - // Repairs the rover using an inventory object - repair = 4; - // Broadcasts a message to nearby rovers (requires data) - broadcast = 5; - // Salvages a neighboring dormant rover for parts - salvage = 6; - // Transfers remote control into dormant rover - transfer = 7; // Waits before performing the next command - wait = 8; + wait = 1; + // Toggles the sails, either catching the wind, or charging from the sun + toggle = 2; + // Turns the rover in the specified bearing (requires bearing) + turn = 3; + // Stashes item at current location in rover inventory + stash = 4; + // Repairs the rover using an inventory object + repair = 5; + // Broadcasts a message to nearby rovers (requires data) + broadcast = 6; + // Salvages a neighboring dormant rover for parts + salvage = 7; + // Transfers remote control into dormant rover + transfer = 8; + // Upgrades a chosen rover specification using 5 rover parts + upgrade = 9; } // Bearing represents a compass direction @@ -121,6 +123,15 @@ enum Bearing { NorthWest = 8; } +// Describes the type of upgrade +enum RoverUpgrade { + RoverUpgradeUnknown = 0; + Range = 1; + Capacity = 2; + MaximumIntegrity = 3; + MaximumCharge = 4; +} + // Command is a single command for a rover message Command { // The command type @@ -135,6 +146,9 @@ message Command { // move - the bearing for the rover to turn to Bearing bearing = 4; + + // upgrade - the upgrade to apply to the rover + RoverUpgrade upgrade = 5; } // CommandRequest describes a set of commands to be requested for the rover From b114b68ff751aae8f153da53bd34804f14794d73 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 12:03:12 +0100 Subject: [PATCH 07/10] Add upgrade command code --- pkg/rove/world.go | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/pkg/rove/world.go b/pkg/rove/world.go index d2483b5..64e3982 100644 --- a/pkg/rove/world.go +++ b/pkg/rove/world.go @@ -15,6 +15,9 @@ import ( const ( // ticksPerNormalMove defines the number of ticks it should take for a "normal" speed move ticksPerNormalMove = 4 + + // upgradeCost is the cost in rover parts needed to upgrade a rover specification + upgradeCost = 5 ) // CommandStream is a list of commands to execute in order @@ -446,6 +449,63 @@ func (w *World) RoverToggle(rover string) (roveapi.SailPosition, error) { return r.SailPosition, nil } +// RoverUpgrade will try to upgrade the rover +func (w *World) RoverUpgrade(rover string, upgrade roveapi.RoverUpgrade) (int, error) { + w.worldMutex.Lock() + defer w.worldMutex.Unlock() + + r, ok := w.Rovers[rover] + if !ok { + return 0, fmt.Errorf("no rover matching id") + } + + cost := upgradeCost + num := 0 + for i := range r.Inventory { + if r.Inventory[i].Type == roveapi.Object_RoverParts { + num++ + } + } + + if num < cost { + r.AddLogEntryf("tried to upgrade but lacked rover parts") + return 0, nil + } + + // Apply the upgrade + var ret int + switch upgrade { + case roveapi.RoverUpgrade_Capacity: + r.Capacity++ + ret = r.Capacity + case roveapi.RoverUpgrade_Range: + r.Range++ + ret = r.Range + case roveapi.RoverUpgrade_MaximumCharge: + r.MaximumCharge++ + ret = r.MaximumCharge + case roveapi.RoverUpgrade_MaximumIntegrity: + r.MaximumIntegrity++ + ret = r.MaximumIntegrity + default: + return 0, fmt.Errorf("unknown upgrade: %s", upgrade) + } + + // Remove the cost in rover parts + var n []Object + for _, o := range r.Inventory { + if o.Type == roveapi.Object_RoverParts && cost > 0 { + cost-- + } else { + n = append(n, o) + } + } + // Assign back the inventory + r.Inventory = n + + return ret, nil +} + // RoverTurn will turn the rover func (w *World) RoverTurn(rover string, bearing roveapi.Bearing) (roveapi.Bearing, error) { w.worldMutex.Lock() @@ -582,6 +642,10 @@ func (w *World) Enqueue(rover string, commands ...*roveapi.Command) error { if c.GetBearing() == roveapi.Bearing_BearingUnknown { return fmt.Errorf("turn command given unknown bearing") } + case roveapi.CommandType_upgrade: + if c.GetUpgrade() == roveapi.RoverUpgrade_RoverUpgradeUnknown { + return fmt.Errorf("upgrade command given unknown upgrade") + } case roveapi.CommandType_wait: case roveapi.CommandType_toggle: case roveapi.CommandType_stash: @@ -729,6 +793,8 @@ func (w *World) ExecuteCommand(c *roveapi.Command, rover string) (done bool, err _, err = w.RoverSalvage(rover) case roveapi.CommandType_transfer: _, err = w.RoverTransfer(rover) + case roveapi.CommandType_upgrade: + _, err = w.RoverUpgrade(rover, c.GetUpgrade()) case roveapi.CommandType_wait: // Nothing to do default: From 4e4af1a1beeaf042b9fad985a99f14a7fb9323eb Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 12:15:49 +0100 Subject: [PATCH 08/10] Add a test for the upgrade command --- pkg/rove/command_test.go | 55 ++++++++++++++++++++++++++++++++++++++++ pkg/rove/world.go | 2 ++ 2 files changed, 57 insertions(+) diff --git a/pkg/rove/command_test.go b/pkg/rove/command_test.go index dde7070..bf1eed6 100644 --- a/pkg/rove/command_test.go +++ b/pkg/rove/command_test.go @@ -248,3 +248,58 @@ func TestCommand_Wait(t *testing.T) { assert.NoError(t, err) assert.Equal(t, roveapi.SailPosition_CatchingWind, r.SailPosition) } + +func TestCommand_Upgrade(t *testing.T) { + w := NewWorld(8) + name, err := w.SpawnRover("") + assert.NoError(t, err) + rover, ok := w.Rovers[name] + assert.True(t, ok) + + // Try an invalid upgrade + err = w.Enqueue(name, &roveapi.Command{Command: roveapi.CommandType_upgrade}) + assert.Error(t, err) + + // Try a valid command but without the parts + err = w.Enqueue(name, &roveapi.Command{Command: roveapi.CommandType_upgrade, Upgrade: roveapi.RoverUpgrade_Capacity}) + assert.NoError(t, err) + + // Ensure nothing changed and we logged the attempt + pre := rover.Capacity + w.Tick() + assert.Equal(t, pre, rover.Capacity) + assert.Contains(t, rover.Logs[len(rover.Logs)-1].Text, "tried") + + // One non-part item + rover.Inventory = []Object{ + { + Type: roveapi.Object_RoverParts, + }, + { + Type: roveapi.Object_RoverParts, + }, + { + Type: roveapi.Object_RockSmall, + }, + { + Type: roveapi.Object_RoverParts, + }, + { + Type: roveapi.Object_RoverParts, + }, + { + Type: roveapi.Object_RoverParts, + }, + } + + // Try a valid command again + err = w.Enqueue(name, &roveapi.Command{Command: roveapi.CommandType_upgrade, Upgrade: roveapi.RoverUpgrade_Capacity}) + assert.NoError(t, err) + + // Check that the capacity increases on the tick and all the parts are used + pre = rover.Capacity + w.Tick() + assert.Equal(t, pre+1, rover.Capacity) + assert.Equal(t, 1, len(rover.Inventory)) + assert.Equal(t, roveapi.Object_RockSmall, rover.Inventory[0].Type) +} diff --git a/pkg/rove/world.go b/pkg/rove/world.go index 64e3982..d509d8d 100644 --- a/pkg/rove/world.go +++ b/pkg/rove/world.go @@ -503,6 +503,8 @@ func (w *World) RoverUpgrade(rover string, upgrade roveapi.RoverUpgrade) (int, e // Assign back the inventory r.Inventory = n + r.AddLogEntryf("upgraded %s to %d", upgrade, ret) + return ret, nil } From 804f82dd2015121222d758bbcb74d41a14d0ae4e Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 12:43:44 +0100 Subject: [PATCH 09/10] Fix up commandline interface for repeat commands to go after the command --- cmd/rove/main.go | 56 ++++++++++++++++++++----------------------- cmd/rove/main_test.go | 4 ++-- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/cmd/rove/main.go b/cmd/rove/main.go index 06999d3..551cda1 100644 --- a/cmd/rove/main.go +++ b/cmd/rove/main.go @@ -35,7 +35,7 @@ func printUsage() { fmt.Fprintln(os.Stderr, "\tregister NAME registers an account and spawns a rover") fmt.Fprintln(os.Stderr, "\tradar prints radar data in ASCII form") fmt.Fprintln(os.Stderr, "\tstatus gets rover status") - fmt.Fprintln(os.Stderr, "\tcommand [REPEAT] CMD [VAL...] queues commands, accepts multiple in sequence for command values see below") + fmt.Fprintln(os.Stderr, "\tcommand CMD [VAL...] [REPEAT] sets the command queue, accepts multiple in sequence") fmt.Fprintf(os.Stderr, "\n") fmt.Fprintln(os.Stderr, "Rover commands:") fmt.Fprintln(os.Stderr, "\ttoggle toggles the current sail mode") @@ -247,16 +247,8 @@ func InnerMain(command string, args ...string) error { // Iterate through each command var commands []*roveapi.Command for i := 0; i < len(args); i++ { - number := 0 - num, err := strconv.Atoi(args[i]) - if err == nil { - number = num - i++ - if i >= len(args) { - return fmt.Errorf("must pass command after repeat number") - } - } + var cmd *roveapi.Command switch args[i] { case "turn": i++ @@ -267,13 +259,10 @@ func InnerMain(command string, args ...string) error { if b == roveapi.Bearing_BearingUnknown { return fmt.Errorf("turn command must be given a valid bearing %s", args[i]) } - commands = append(commands, - &roveapi.Command{ - Command: roveapi.CommandType_turn, - Bearing: b, - Repeat: int32(number), - }, - ) + cmd = &roveapi.Command{ + Command: roveapi.CommandType_turn, + Bearing: b, + } case "broadcast": i++ if len(args) == i { @@ -281,22 +270,29 @@ func InnerMain(command string, args ...string) error { } else if len(args[i]) > 3 { return fmt.Errorf("broadcast command must be given ASCII triplet of 3 or less: %s", args[i]) } - commands = append(commands, - &roveapi.Command{ - Command: roveapi.CommandType_broadcast, - Data: []byte(args[i]), - Repeat: int32(number), - }, - ) + cmd = &roveapi.Command{ + Command: roveapi.CommandType_broadcast, + Data: []byte(args[i]), + } default: // By default just use the command literally - commands = append(commands, - &roveapi.Command{ - Command: roveapi.CommandType(roveapi.CommandType_value[args[i]]), - Repeat: int32(number), - }, - ) + cmd = &roveapi.Command{ + Command: roveapi.CommandType(roveapi.CommandType_value[args[i]]), + } } + + // Try and convert the next command to a number + number := 0 + if len(args) > i+1 { + num, err := strconv.Atoi(args[i+1]) + if err == nil { + number = num + i++ + } + } + cmd.Repeat = int32(number) + + commands = append(commands, cmd) } _, err := client.Command(ctx, &roveapi.CommandRequest{ diff --git a/cmd/rove/main_test.go b/cmd/rove/main_test.go index 25e08ae..ca83947 100644 --- a/cmd/rove/main_test.go +++ b/cmd/rove/main_test.go @@ -55,8 +55,8 @@ func Test_InnerMain(t *testing.T) { assert.NoError(t, InnerMain("command", "stash")) assert.NoError(t, InnerMain("command", "repair")) assert.NoError(t, InnerMain("command", "broadcast", "abc")) - assert.NoError(t, InnerMain("command", "10", "wait")) - assert.NoError(t, InnerMain("command", "1", "wait", "turn", "NW", "toggle", "broadcast", "zyx")) + assert.NoError(t, InnerMain("command", "wait", "10")) + assert.NoError(t, InnerMain("command", "wait", "1", "turn", "NW", "toggle", "broadcast", "zyx")) // Give it malformed commands assert.Error(t, InnerMain("command", "unknown")) From 35b25dde9880436fe4a2394fc2bdf47e5733f271 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 2 Aug 2020 12:49:15 +0100 Subject: [PATCH 10/10] Add the upgrade command to the cmdline client --- cmd/rove/main.go | 23 +++++++++++++++++++++++ cmd/rove/main_test.go | 2 ++ 2 files changed, 25 insertions(+) diff --git a/cmd/rove/main.go b/cmd/rove/main.go index 551cda1..f1e993d 100644 --- a/cmd/rove/main.go +++ b/cmd/rove/main.go @@ -44,6 +44,7 @@ func printUsage() { fmt.Fprintln(os.Stderr, "\tbroadcast MSG broadcast a simple ASCII triplet to nearby rovers") fmt.Fprintln(os.Stderr, "\tsalvage salvages a dormant rover for parts") fmt.Fprintln(os.Stderr, "\ttransfer transfer's control into a dormant rover") + fmt.Fprintln(os.Stderr, "\tupgrade SPEC spends rover parts to upgrade one rover spec (capacity, range, integrity, charge") fmt.Fprintln(os.Stderr, "\twait waits before performing the next command") fmt.Fprintf(os.Stderr, "\n") fmt.Fprintln(os.Stderr, "Environment") @@ -274,6 +275,28 @@ func InnerMain(command string, args ...string) error { Command: roveapi.CommandType_broadcast, Data: []byte(args[i]), } + case "upgrade": + i++ + if len(args) == i { + return fmt.Errorf("upgrade command must be passed a spec to upgrade") + } + var u roveapi.RoverUpgrade + switch args[i] { + case "capacity": + u = roveapi.RoverUpgrade_Capacity + case "range": + u = roveapi.RoverUpgrade_Range + case "integrity": + u = roveapi.RoverUpgrade_MaximumIntegrity + case "charge": + u = roveapi.RoverUpgrade_MaximumCharge + default: + return fmt.Errorf("upgrade command must be passed a known upgrade spec") + } + cmd = &roveapi.Command{ + Command: roveapi.CommandType_upgrade, + Upgrade: u, + } default: // By default just use the command literally cmd = &roveapi.Command{ diff --git a/cmd/rove/main_test.go b/cmd/rove/main_test.go index ca83947..250988a 100644 --- a/cmd/rove/main_test.go +++ b/cmd/rove/main_test.go @@ -54,6 +54,7 @@ func Test_InnerMain(t *testing.T) { assert.NoError(t, InnerMain("command", "toggle")) assert.NoError(t, InnerMain("command", "stash")) assert.NoError(t, InnerMain("command", "repair")) + assert.NoError(t, InnerMain("command", "upgrade", "capacity")) assert.NoError(t, InnerMain("command", "broadcast", "abc")) assert.NoError(t, InnerMain("command", "wait", "10")) assert.NoError(t, InnerMain("command", "wait", "1", "turn", "NW", "toggle", "broadcast", "zyx")) @@ -61,5 +62,6 @@ func Test_InnerMain(t *testing.T) { // Give it malformed commands assert.Error(t, InnerMain("command", "unknown")) assert.Error(t, InnerMain("command", "broadcast")) + assert.Error(t, InnerMain("command", "upgrade")) assert.Error(t, InnerMain("command", "1")) }