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.
 
 
 
 
 

59 lines
931 B

syntax = "proto3";
import "google/protobuf/empty.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);
// TODO add status
}
message Image {
bytes face = 1;
bytes back = 2;
}
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 CardKind {
string kind = 1;
}
message MessageStatus {
message Card {
CardKind kind = 1;
bool visible = 2;
}
message Pile {
repeated Card cards = 1;
}
message Piles {
map<string, Pile> piles = 1;
}
Piles commonPiles = 1;
repeated Piles playerPiles = 2;
}