tewtal / SMZ3Randomizer

Super Metroid & A Link to the Past Crossover Item Randomizer V11
https://samus.link/
MIT License
74 stars 32 forks source link

Logic unit tests #171

Closed RebelusQuo closed 3 years ago

RebelusQuo commented 3 years ago

As the commit mentions, having cases of progression that covers both the region's CanEnter and the logic of the location made for an O(n^2) situation that the NUnit framework handled very poorly. I had to stretch into the internals of Location so I could test the location logic expressions separate from the region. With that change the tests run somewhat quickly.

This PR contains some important logic changes that need as many eyes as possible for verification. @TarThoron

TarThoron commented 3 years ago

The "Correct logic..." commit looks good to me. The other two are above my head.

RebelusQuo commented 3 years ago

Force pushed a fix for a mistake that missed skipping the placement of an item at a location while verifying the negative sub cases (that skipping a requirement lead to the expression evaluating to false).

TarThoron commented 3 years ago

By requiring grapple/space to cross Spikey Acid Snakes (due to high damage without), you also ensure that you can exit through Croc Escape, thus making Frog Speedway superfluous.

RebelusQuo commented 3 years ago

I can rebase and separate tidy up from actual functional changes. I'm going through an audit run using that new nifty CLI tool and I've found missing cases so I will rebase anyway.

RebelusQuo commented 3 years ago

I did the things. Review one commit at a time for greater success.

tewtal commented 3 years ago

Looks all good to me, I'll merge this then.