increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 159 forks source link

again and win fighting with eachother #553

Closed increpare closed 3 years ago

increpare commented 3 years ago

https://www.puzzlescript.net/editor.html?hack=35b78c89f59ea8ea2e508ab03c299c91

win should win but again somehow has priority...still not sure what's going on (hat tip to 00gogo00)

sftrabbit commented 3 years ago

I looked into this recently (in fact, that's my example!) and it seems to be related to the way that it'll try to determine if it even needs to schedule the next again turn by running a non-destructive turn that will exit early as soon as a rule changes anything. I guess it ends up being less non-destructive than expected. I'm not totally sure how the win causes the problem though - I didn't get that far.

increpare commented 3 years ago

Yeah, the 'feel ahead to see what will happen' nature of again makes debugging confusing ^^

increpare commented 3 years ago

@sftrabbit thanks for the bug-finding :)