wire_protocol.fbs 449 B

1234567891011121314151617181920212223242526272829303132
  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. UNKNOWN_COMMAND = 1,
  12. }
  13. table CommandRequest {
  14. command:Command;
  15. }
  16. table Playfield {
  17. rows:short;
  18. cols:short;
  19. cells:[ubyte];
  20. }
  21. table CommandResponse {
  22. error:CommandResponseError;
  23. playfield:Playfield;
  24. }
  25. root_type CommandRequest;
  26. root_type CommandResponse;