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.
 
 
 
 
 

61 lines
1.0 KiB

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);
rpc status(google.protobuf.Empty) returns(MessageStatus);
}
message CardKind {
string kind = 1;
}
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 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; // {a: [""], b:[""]}
repeated Piles playerPiles = 2; // [{...}, {...}]
repeated common.Name names = 3;
uint32 currentTurn = 4;
}