The graphics core that you should use is detailed here.
Your solution will communicate with the server to request puzzles to solve. This is the format of the messages that you should send.
The server is at IP
192.168.10.1 on port
51100. Remember to use your IP address.
Send this to the server to request a puzzle.
|Size||1||Between 2 and 10 inclusive and is the width and height of the puzzle. i.e. Set size to 3 for a 3x3 puzzle|
|Random||4||A big-endian 4 byte integer (see below). If set to 0 then the generator will respond with a random puzzle. If not 0, then the generator will use the value as its random seed, so you will get the same puzzle each time.|
The server will respond as follows:
|Size||1||Set to whatever you requested.|
|Random||4||Set to whatever you requested.|
|Tiles||Size*Size*4||The tiles of your puzzle. See below.|
Each tile is four bytes, and there will be
size squared number of tiles. For each tile the first byte is the top edge, then the right-hand edge, then the bottom edge, then the left-hand edge. For example, these tiles are encoded as follows:
0x03, 0x01, 0x04, 0x03, 0x01, 0x02, 0x01, 0x06
If you can't remember endianness from first year, these diagrams show how big and little endian numbers are stored.