abnuo 2023-10-21 21:06 (Edited)

You are a warehouse worker. Your job is to push boxes into the correct locations.
D-Pad to move
A to undo
B to restart the level

sokoban.nx | Open in app
2023-10-23 17:49
sokoban.nx | Open in app
2023-10-21 21:10
sokoban.nx | Open in app
2023-10-21 21:06

McPepic 2023-10-22 01:04

Super cool! Simple premise that quickly gets difficult. It would be kind of nice to be able to undo the last move, rather than having to reset the whole level.

Dan 2023-10-22 21:08 (Edited)

The game is nice.

Undo function would be great, as sometime misclicks may happen.
Either 1 time undo or all steps undo's.

It should be easy to do.

abnuo 2023-10-23 17:49

I managed to implement a 1 step undo, I feel like any more than that would be hard to do.

Dan 2023-10-23 18:54 (Edited)

Great !

In my peg solitaire game, i'm using an array to store the undo moves. (just like your level$ array)

At the start, the gamemap is copied into the 1st undo position.

Then the undo count variable is increased, and the gamefield is scanned (only after the player has moved) and stored into the undo array.

When you press the undo button, the saved map is put back onto the field and the undo count is decreased.

But 1 undo is ok as well.

Log in to reply.