Twist Cube
Our reproduction of the well known cube. Can you write the code that will match up all six sides?
To rearrange each square on the cube so that all of the colours on each side of the cube match.
An example of the gamestate JSON
{
'LeadingSolution': None,
'ResponseDeadline': 1544009796770,
'IsLeader': False,
'IsMover': True,
'FRONT': [
['Y2', 'O5', 'O2'],
['G1', 'G4', 'B3'],
['O0', 'O3', 'R8']
],
'BACK': [
['O6', 'Y3', 'R2'],
['Y1', 'B4', 'W3'],
['W8', 'Y5', 'O8']
],
'LEFT': [
['B0', 'B1', 'G8'],
['O1', 'O4', 'W7'],
['G6', 'R1', 'W0']
],
'RIGHT': [
['G0', 'Y7', 'Y6'],
['R5', 'R4', 'G7'],
['B6', 'R3', 'G2']
],
'UP': [
['W2', 'O7', 'B8'],
['W1', 'W4', 'B7'],
['R6', 'G3', 'W6']
],
'DOWN': [
['B2', 'B5', 'Y8'],
['W5', 'Y4', 'G5'],
['Y0', 'R7', 'R0']
],
'GameStatus': 'RUNNING',
'GameId': 2398826,
'OpponentId': 'housebot-practise'
}
A description of each of the gamestate fields
Key | Description |
LeadingSolution | |
ResponseDeadline | |
IsLeader | |
IsMover | |
FRONT | |
BACK | |
LEFT | |
RIGHT | |
UP | |
DOWN | |
GameStatus | |
GameId | |
OpponentID | |
More detail required
["1U'", "1L'", "1D'", "1R'", "1F'", "1L'", '1R', '1F', '1L', '1F', "1B'", "1R'", '1B', "1B'"]
More detail required