Version 3.003, 2021-06-30
A sample board JSON element (using legacy shapes and colors) may look like this:
{"id":"it-does-not-matter-what-goes-here", "value":[ {"color":"yellow","shape":"square","id":"1","x":1,"y":1}, {"color":"black","shape":"square","id":"6","x":6,"y":1}, {"color":"red","shape":"square","id":"31","x":1,"y":6}, {"color":"blue","shape":"square","id":"36","x":6,"y":6}], "name":"Four squares in corners"}You can copy and paste one from the output of the Game Server, if you use the Captive Game Server or HTML Play in the web server.
You can have boards with images too, e.g.:
{"id":"cats","value":[ {"id":0,"x":4,"y":3,"image":"vm/image_test_01/cat-07.png","buckets":[]}, {"id":1,"x":1,"y":4,"image":"vm/image_test_01/cat-03.png","buckets":[]}, {"id":2,"x":1,"y":5,"image":"vm/image_test_01/cat-03.png","buckets":[]}, {"id":3,"x":6,"y":6,"image":"vm/image_test_01/cat-13.png","buckets":[0]} ], "name":"Some cats"}
You can upload a JSON file with a single board; or you can upload several files, each one containing a single board element. (As an example, you can pick any file(s) from under /opt/tomcat/game-data/boards/) :
The content of each file you upload in this form should look like one of the examples above.
Example:
{"boards":[ {"id":"Board 1", "value":[ {"color":"yellow","shape":"square","id":"1","x":1,"y":1}, {"color":"black","shape":"square","id":"6","x":6,"y":1}, {"color":"red","shape":"square","id":"31","x":1,"y":6}, {"color":"blue","shape":"square","id":"36","x":6,"y":6}], "name":"Four squares in corners"}, {"id":"Board 2", "value":[ {"color":"yellow","shape":"square","id":"1","x":2,"y":2}, {"color":"black","shape":"square","id":"6","x":5,"y":2}, {"color":"red","shape":"square","id":"31","x":2,"y":5}, {"color":"blue","shape":"square","id":"36","x":5,"y":5}], "name":"Four squares near corners"} ]}
Or you can upload a JSON file with a list of boards, as per the example above.