wire_protocol.fbs 472 B

123456789101112131415161718192021222324252627282930313233
  1. namespace wire_protocol;
  2. enum Command : short {
  3. ShiftLeft = 0,
  4. ShiftRight = 1,
  5. Rotate = 2,
  6. Land = 3,
  7. GetGameState = 4,
  8. }
  9. enum CommandResponseError : short {
  10. OK = 0,
  11. INVALID_COMMAND = 1,
  12. UNKNOWN_COMMAND = 2,
  13. }
  14. table CommandRequest {
  15. command:Command;
  16. }
  17. table Playfield {
  18. rows:short;
  19. cols:short;
  20. cells:[ubyte];
  21. }
  22. table CommandResponse {
  23. error:CommandResponseError;
  24. playfield:Playfield;
  25. }
  26. root_type CommandRequest;
  27. root_type CommandResponse;