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 piles = 1; } Piles commonPiles = 1; repeated Piles playerPiles = 2; uint32 currentTurn = 3; }