Release

Cubes (solitaire game)

3

was8bit 2021-09-06 21:12 (Edited)

Instructions inside the top of code...

You can try to play out the cubes in hand with as few dealt as possible, or try playing out all the cubes...

Cubes.nx | Open in app
2021-09-06 21:12

was8bit 2021-09-08 12:39

now, this game allows you to rearrange all tiles, so say you rearrange 30 tiles around...
It is possible that there may be tiles that are illegal (less than 3) temporarily while you shuffle the tiles arround.... how then to reset the board if when the (B) button is pushed and finds an illegal play on the board...

My solution was to save the last legal state to be saved on a hidden background... the (B) button checks for any illegal arrangement, and if it finds one the code simply copies the old saved BG to the visible BG, effectively resetting the game state..

If the (B) button finds no errors, then the visible BG is copied to the hidden BG to save this game state...

Otherwise, one would have to have the code save each and every move... then undo each move backwards.... possible, but i like my approach better :)


Log in to reply.