Skip to content

Solver runs rules twice with run_rules_on_level_start option #130

Description

@zacharybarbanell

Describe the bug
In a game with run_rules_on_level_start and non-idempotent rules, when the solver ends, it runs the rules again, which puts the level in the wrong state, so the output solution can't be previewed

Reproduction Steps

  1. Load the example game
  2. Run the solver from the initial level state
  3. Hover over the output moves and see that they are the wrong states (and, indeed, are not even reachable)

What did you expect would happen?
The solver wouldn't run the rules after it finishes

OS & Browser version, desktop/mobile
Firefox, Desktop

Screenshots, example projects, other relevant issues, etc.

sprite_size 7x7
noaction
require_player_movement
run_rules_on_level_start

========
OBJECTS
========

Background 
WHITE lightgray
0000000
0000000
0000000
0001000
0000000
0000000
0000000

Wall 
LIGHTGRAY
0000000
0000000
0000000
0000000
0000000
0000000
0000000

Player 
black orange pink blue
.......
..000..
..111..
.22222.
..333..
..3.3..
.......

Flag
yellow
.......
.00000.
.00000.
.00000.
.....0.
.....0.
.....0.

Countdown
darkgray lightblue black
0000000
0222220
0222220
0222220
0222220
0222220
0000000

0S
red
.......
..000..
..0.0..
..0.0..
..0.0..
..000..
.......

1S
orange
.......
...0...
...0...
...0...
...0...
...0...
.......

2S
yellow
.......
..000..
....0..
..000..
..0....
..000..
.......

3S
lightgreen
.......
..000..
....0..
..000..
....0..
..000..
.......

4S
lightgreen
.......
..0.0..
..0.0..
..000..
....0..
....0..
.......

5S
lightgreen
.......
..000..
..0....
..000..
....0..
..000..
.......

6S
lightgreen
.......
..000..
..0....
..000..
..0.0..
..000..
.......

7S
lightgreen
.......
..000..
....0..
....0..
....0..
....0..
.......

8S
lightgreen
.......
..000..
..0.0..
..000..
..0.0..
..000..
.......

9S
lightgreen
.......
..000..
..0.0..
..000..
....0..
..000..
.......

=======
LEGEND
=======

. = Background
# = Wall
@ = Player
! = Wall and Countdown and 6S
& = Flag

=======
SOUNDS
=======



sfx0 73622607 (button press)
sfx1 26522607 (button up)
sfx2 40525004 (die)
sfx3 47294902 (win)

================
COLLISIONLAYERS
================


Background
Flag
Wall, Player
Countdown
0S,1S,2S,3S,4S,5S,6S,7S,8S,9S

======
RULES     
======     

late [Countdown 1S] -> [Countdown 0S]
late [Countdown 2S] -> [Countdown 1S]
late [Countdown 3S] -> [Countdown 2S]
late [Countdown 4S] -> [Countdown 3S]
late [Countdown 5S] -> [Countdown 4S]
late [Countdown 6S] -> [Countdown 5S]
late [Countdown 7S] -> [Countdown 6S]
late [Countdown 8S] -> [Countdown 7S]
late [Countdown 9S] -> [Countdown 8S]

late [Countdown 0S] [Player no Flag] -> [Countdown 0S] [Wall] sfx2

late [Player Flag] -> win sfx3

==============
WINCONDITIONS
==============

=======     
LEVELS
=======


!#########
#........#
#........#
#.@....&.#
#........#
#........#
##########

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions