A REST-like API backend for the game Black Box

        try the Demo.

Show a Board
Game Basics:


The Black Box Board is 8x8.
The co-ordinate system uses 0,0 as the upper-left hand corner
All games will have 4 hidden Spheres
Entry positions are numbered from 0-31, going clockwise around the board starting at the top left.
                  0 1 2 3 4 5 6 7
                31               8
                30               9
                29               10
                28               11
                27               12
                26               13
                25               14
                24               15
                  2 2 2 2 1 1 1 1
                  3 2 1 0 9 8 7 6
        

Get a new random board:
https://blackbox.soward.net/game/getRandomGame  
Response:
    {
        "game":53134
    }
There are 635,376 unique boards available.

Return an 8x8 arrary of a Board:
https://blackbox.soward.net/game/gameBoard/<boardID>  
Response:
    {
        [ 
            [0,0,0,0,0,0,0],
            [0,0,0,0,0,0,0],
            [0,0,0,0,1,0,0],
            [0,0,0,0,0,0,0],
            [0,0,1,0,0,0,0],
            [0,0,0,0,0,0,0],
            [0,0,1,0,0,0,1],
        ]
    }

Cast a Ray from an Entry Point.
https://blackbox.soward.net/game/castRay/<boardID>/<position>  
Response:
    {
        "exit":23
    }
    {   
        "exit": "H"
    }
    {   
        "exit": "R"
    }
    {   
        "error": "Invalid Board"
    }
            

Make a Guess to Solve
Note: Requires using the HTTP POST Method to send JSON Array of exactly 4 [x,y] pairs
https://blackbox.soward.net/game/makeGuess/<boardID>  
Response:
    {
        "matches":2,
        "hits":[ 
            [0,3], [5,5]
            ],
        "misses":[
            [1,5], [3,7]
            ]
    }