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); // rpc pollStatus(common.LastStatusTimestamp) returns(common.HasNewStatus); // } message CardKind { string kind = 1; } 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; } message Piles { map piles = 1; } Piles commonPiles = 1; // {a: [""], b:[""]} repeated Piles playerPiles = 2; // [{...}, {...}] repeated common.Name names = 3; uint32 currentTurn = 4; }