Bram-Hub / LEGUP

Logic Engine for Grid-Using Puzzles - a better way to learn formal logic
GNU General Public License v3.0
33 stars 82 forks source link

[BUG] Going back to transition with contradiction rule should not allow changes to board #624

Closed Bram28 closed 12 months ago

Bram28 commented 1 year ago

Description

When you have applied a contradiction rule, and then go back to that transition, LEGUP allows you to change the board (and as a result the rule might even check out when it shouldn't!) ... but that is not allowed ... you should never be able to change the board and select a contradiction rule as part of the same transition.

Steps to Reproduce

First get to this point:

image

Now select the 'Cannot Light a Cell' Contradiction rule:

image

Notice the rule does not check out ... which it correct: there is no such contradiction here!

OK, but now make the square above the 2 empty, and you get:

image

And sure, the is a contradiction on the board as shown ... but of course you should not have been able to make a change to the board when the transition is a contradiction rule! Also note that after that initial board you first make that square empty, and then select the contradiction rule, the change to the board gets throw out (I suppose that is LEGUP's way of making sure that you cannot make board changes and select a contradiction rule) .. but of course you should nont be able to make board changes afterwards either.

Expected Behavior

The board should not be modifiable during a transition that has a contradiction rule.

Screenshots

No response

Puzzle Files

No response

Additional Context

No response

Chase-Grajeda commented 1 year ago

Below is a file with the bugged state buggyfile.zip

Chase-Grajeda commented 1 year ago

Attached is a file that can be used to test the implementation. The board from the yellow (non-contradictory) branch should be modifiable when clicking on the transition. The board from the red (contradictory) branch should NOT be modifiable when clicking on the transition.

testfile.zip

Chase-Grajeda commented 12 months ago

Closed with merge