syntax = "proto3"; import "core.proto"; package ru.m.puzzlez.proto.game; message ImageId { string source = 1; string id = 2; bool thumb = 3; } enum BoundType { NONE = 0; OUT = 1; IN = 2; } message PartBound { BoundType spike = 1; BoundType side = 2; } message PartBounds { PartBound left = 1; PartBound right = 2; PartBound top = 3; PartBound bottom = 4; } enum PartLocation { TABLE = 0; HAND = 1; IMAGE = 2; } message Part { int32 id = 1; ru.m.puzzlez.proto.core.IntPoint point = 2; PartBounds bounds = 3; ru.m.puzzlez.proto.core.Point position = 4; PartLocation location = 5; ru.m.puzzlez.proto.core.Rectangle rect = 6; string playerId = 7; } message GamePreset { ImageId image = 1; ru.m.puzzlez.proto.core.IntPoint grid = 2; ru.m.puzzlez.proto.core.Rectangle tableRect = 3; ru.m.puzzlez.proto.core.Rectangle imageRect = 4; } enum GameStatus { READY = 0; STARTED = 1; COMPLETE = 2; } message GameState { string id = 1; GameStatus status = 3; GamePreset preset = 4; repeated ru.m.puzzlez.proto.core.User users = 5; repeated Part parts = 6; bool online = 7; }