Advertisement
AndTer99

Tablut competition client/server data

Nov 1st, 2022 (edited)
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Connect with TCP
  2.  
  3. Server ports:
  4. 5800 WHITE player
  5. 5801 BLACK player
  6.  
  7. Data from client each turn:
  8. {
  9. "from": <column letter><row index+1>,
  10. "to": <column letter><row index+1>,
  11. "turn": <player color>
  12. }
  13.  
  14. Data from server each turn:
  15. {
  16. "board": <matrix of strings representing the new board state - each is either "BLACK","WHITE","KING" or "EMPTY">
  17. "turn": <'color' of the player that has to move>
  18. }
  19.  
  20. To initially connect to the server, send the NAME OF THE PLAYER on the corresponding port (5800 or 5801)
Tags: TABLUT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement