diff --git a/modules/caninerabbit/module.go b/modules/caninerabbit/module.go index f725edea7..5f530b599 100644 --- a/modules/caninerabbit/module.go +++ b/modules/caninerabbit/module.go @@ -91,25 +91,25 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri roomid = primitive.NewObjectID().Hex() chess = append(chess, &pb.DBCanineRabbitChess{ - Id: primitive.NewObjectID().Hex(), + Id: 1, Stype: 0, X: 4, Y: 1, }) chess = append(chess, &pb.DBCanineRabbitChess{ - Id: primitive.NewObjectID().Hex(), + Id: 2, Stype: 1, X: 1, Y: 0, }) chess = append(chess, &pb.DBCanineRabbitChess{ - Id: primitive.NewObjectID().Hex(), + Id: 3, Stype: 1, X: 0, Y: 1, }) chess = append(chess, &pb.DBCanineRabbitChess{ - Id: primitive.NewObjectID().Hex(), + Id: 4, Stype: 1, X: 1, Y: 2, diff --git a/pb/caninerabbit_db.pb.go b/pb/caninerabbit_db.pb.go index e089bed60..847042adb 100644 --- a/pb/caninerabbit_db.pb.go +++ b/pb/caninerabbit_db.pb.go @@ -170,10 +170,10 @@ type DBCanineRabbitChess struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` - Stype int32 `protobuf:"varint,2,opt,name=stype,proto3" json:"stype"` //0兔子 1猎犬 - X int32 `protobuf:"varint,3,opt,name=x,proto3" json:"x"` - Y int32 `protobuf:"varint,4,opt,name=y,proto3" json:"y"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + Stype int32 `protobuf:"varint,2,opt,name=stype,proto3" json:"stype"` //0兔子 1猎犬 + X int32 `protobuf:"varint,3,opt,name=x,proto3" json:"x"` + Y int32 `protobuf:"varint,4,opt,name=y,proto3" json:"y"` } func (x *DBCanineRabbitChess) Reset() { @@ -208,11 +208,11 @@ func (*DBCanineRabbitChess) Descriptor() ([]byte, []int) { return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{2} } -func (x *DBCanineRabbitChess) GetId() string { +func (x *DBCanineRabbitChess) GetId() int32 { if x != nil { return x.Id } - return "" + return 0 } func (x *DBCanineRabbitChess) GetStype() int32 { @@ -432,7 +432,7 @@ var file_caninerabbit_caninerabbit_db_proto_rawDesc = []byte{ 0x0a, 0x09, 0x48, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x48, 0x65, 0x61, 0x64, 0x73, 0x74, 0x61, 0x72, 0x74, 0x22, 0x57, 0x0a, 0x13, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, - 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x65, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01,