You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
1.7 KiB
99 lines
1.7 KiB
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "common.proto";
|
|
|
|
package game;
|
|
|
|
// Service to use when user's in a running game
|
|
// service Game {
|
|
// rpc getCardImage(CardKind) returns(Image);
|
|
// rpc onClick(CardId) returns(google.protobuf.Empty);
|
|
// rpc status(google.protobuf.Empty) returns(MessageStatus);
|
|
// rpc pollStatus(common.LastStatusTimestamp) returns(common.HasNewStatus);
|
|
// }
|
|
|
|
message CardKind {
|
|
string kind = 1;
|
|
}
|
|
|
|
message Cards {
|
|
message Card {
|
|
string kind = 1;
|
|
google.protobuf.Timestamp time = 2;
|
|
}
|
|
repeated Card cards = 1;
|
|
}
|
|
|
|
message Images {
|
|
message SetUp {
|
|
uint32 number = 1;
|
|
}
|
|
message DataPacket {
|
|
uint32 id = 1;
|
|
bytes data = 2;
|
|
}
|
|
oneof data {
|
|
SetUp setup = 1;
|
|
DataPacket dataPacket = 2;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
message Image {
|
|
bytes face = 1;
|
|
bytes back = 2;
|
|
string kind = 3;
|
|
}
|
|
|
|
message CardIndex {
|
|
oneof pos {
|
|
uint32 index = 1;
|
|
google.protobuf.Empty top = 2;
|
|
google.protobuf.Empty bottom = 3;
|
|
}
|
|
}
|
|
|
|
message PileKind {
|
|
oneof kind {
|
|
uint32 owned = 1;
|
|
google.protobuf.Empty common = 2;
|
|
}
|
|
}
|
|
|
|
message CardId {
|
|
PileKind pileKind = 1;
|
|
string pileName = 2;
|
|
CardIndex cardIndex = 3;
|
|
}
|
|
|
|
message GameStatus {
|
|
message Card {
|
|
CardKind kind = 1;
|
|
bool visible = 2;
|
|
string uuid = 3;
|
|
}
|
|
message Pile {
|
|
repeated Card cards = 1;
|
|
bool faceDown = 2;
|
|
bool visible = 3;
|
|
string name = 4;
|
|
}
|
|
message Piles {
|
|
map<string, Pile> piles = 1;
|
|
}
|
|
|
|
message CustomInfoMessage {
|
|
string title = 1;
|
|
string m = 2;
|
|
}
|
|
|
|
Piles commonPiles = 1; // {a: [""], b:[""]}
|
|
repeated Piles playerPiles = 2; // [{...}, {...}]
|
|
repeated common.Name names = 3;
|
|
uint32 currentTurn = 4;
|
|
bool hasFinished = 5;
|
|
CustomInfoMessage info = 6;
|
|
}
|