aboutsummaryrefslogtreecommitdiff
path: root/PuzzleApplet.java
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-12-26 11:25:00 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-27 15:18:42 +0000
commit4ec2c580453b0629b9935cb1e90017de6d110608 (patch)
tree7719d5cccd14ebfb341700e34c515fb386bbf8b5 /PuzzleApplet.java
parentd3329734387dbaf972b651729245d4ffe7efcc4e (diff)
downloadpuzzles-4ec2c580453b0629b9935cb1e90017de6d110608.zip
puzzles-4ec2c580453b0629b9935cb1e90017de6d110608.tar.gz
puzzles-4ec2c580453b0629b9935cb1e90017de6d110608.tar.bz2
puzzles-4ec2c580453b0629b9935cb1e90017de6d110608.tar.xz
When filling in or blanking a square, don't generate null moves
This applies to various square-filling games: Keen, Solo, Towers, Undead, and Unequal. In all cases, selecting a square and pressing the number that was already in it, or selecting an empty square and pressing Backspace, would add a move to the undo chain that did nothing. This also meant that the convention where Backspace from the top level of an application in KaiOS leaves the application didn't work. Now the various interpret_move() functions check the current state of the grid, and return NULL or UI_UPDATE where a move wouldn't change the board. UI_UPDATE is returned in the case where the cursor was put in place using the mouse, because in those cases I think the cursor should still be hidden again. NULL is returned when the cursor was put in place by keyboard, because then there's really nothing to do.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions