上传走棋游戏代码

This commit is contained in:
liwei1dao 2023-11-02 14:01:42 +08:00
parent 5d77d749b5
commit c7ed61fb5a
2 changed files with 11 additions and 11 deletions

View File

@ -91,25 +91,25 @@ func (this *CanineRabbit) CreateRoom(sessions []comm.IUserSession, rulesStr stri
roomid = primitive.NewObjectID().Hex() roomid = primitive.NewObjectID().Hex()
chess = append(chess, &pb.DBCanineRabbitChess{ chess = append(chess, &pb.DBCanineRabbitChess{
Id: primitive.NewObjectID().Hex(), Id: 1,
Stype: 0, Stype: 0,
X: 4, X: 4,
Y: 1, Y: 1,
}) })
chess = append(chess, &pb.DBCanineRabbitChess{ chess = append(chess, &pb.DBCanineRabbitChess{
Id: primitive.NewObjectID().Hex(), Id: 2,
Stype: 1, Stype: 1,
X: 1, X: 1,
Y: 0, Y: 0,
}) })
chess = append(chess, &pb.DBCanineRabbitChess{ chess = append(chess, &pb.DBCanineRabbitChess{
Id: primitive.NewObjectID().Hex(), Id: 3,
Stype: 1, Stype: 1,
X: 0, X: 0,
Y: 1, Y: 1,
}) })
chess = append(chess, &pb.DBCanineRabbitChess{ chess = append(chess, &pb.DBCanineRabbitChess{
Id: primitive.NewObjectID().Hex(), Id: 4,
Stype: 1, Stype: 1,
X: 1, X: 1,
Y: 2, Y: 2,

View File

@ -170,10 +170,10 @@ type DBCanineRabbitChess struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
Stype int32 `protobuf:"varint,2,opt,name=stype,proto3" json:"stype"` //0兔子 1猎犬 Stype int32 `protobuf:"varint,2,opt,name=stype,proto3" json:"stype"` //0兔子 1猎犬
X int32 `protobuf:"varint,3,opt,name=x,proto3" json:"x"` X int32 `protobuf:"varint,3,opt,name=x,proto3" json:"x"`
Y int32 `protobuf:"varint,4,opt,name=y,proto3" json:"y"` Y int32 `protobuf:"varint,4,opt,name=y,proto3" json:"y"`
} }
func (x *DBCanineRabbitChess) Reset() { func (x *DBCanineRabbitChess) Reset() {
@ -208,11 +208,11 @@ func (*DBCanineRabbitChess) Descriptor() ([]byte, []int) {
return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{2} return file_caninerabbit_caninerabbit_db_proto_rawDescGZIP(), []int{2}
} }
func (x *DBCanineRabbitChess) GetId() string { func (x *DBCanineRabbitChess) GetId() int32 {
if x != nil { if x != nil {
return x.Id return x.Id
} }
return "" return 0
} }
func (x *DBCanineRabbitChess) GetStype() int32 { 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, 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, 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, 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, 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, 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, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01,