-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bumper Stickers: add location rules #2254
Bumper Stickers: add location rules #2254
Conversation
As mentioned in discord already, this should really be adding tests; especially when testing is one of the claims as none of the generic tests are affected by this change. You also shouldn't be setting rules in "generate basic" |
I'm not sure what you mean by "adding tests". As for setting rules in |
I have literally never written these before so 🤷
Tests failing. So either tests bad or code bad. |
Definitely bad tests. I am absolutely not practiced at writing unit tests. I'll let you know as soon as I can set some time for this. |
In your case, you could just collect items and check that the expected latest location is accessible, but the next isn't, using items = self.get_item_by_name("Treasure Bumper")
# some kind of loop, doing
self.collect(items[i])
self.assertTrue(self.can_reach_location(locations[i]))
self.assertFalse(self.can_reach_location(locations[i+1])) |
Test still failing. If you run them in pycharm, you can inspect it, or you could use subtests or a custom failure message to get a better output. i.e. assertTrue(something, "{x+1} couldn't be reached in {x}") |
since we're using rules now
Sorry for taking so long, but it works now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the changed rules are actually correct, lgtm
* bumpstik: treasure/booster location rules * bumpstik: oop missed a bit * bumpstik: apply access rule to Hazards check * bumpstik: move completion cond. to set_rules * bumpstik: tests? I have literally never written these before so 🤷 * bumpstik: oops * bumpstik: how about this? * bumpstik: fix some logic * bumpstik: this almost works but not quite * bumpstik: accurate region boundaries for BBs since we're using rules now * bumpstik: holy heck it works now
* bumpstik: treasure/booster location rules * bumpstik: oop missed a bit * bumpstik: apply access rule to Hazards check * bumpstik: move completion cond. to set_rules * bumpstik: tests? I have literally never written these before so 🤷 * bumpstik: oops * bumpstik: how about this? * bumpstik: fix some logic * bumpstik: this almost works but not quite * bumpstik: accurate region boundaries for BBs since we're using rules now * bumpstik: holy heck it works now
What is this fixing or adding?
Adds location access rules for Bumper Stickers' Treasure Bumper, Bonus Booster, and All Hazards locations.
How was this tested?
Ran AP unit tests. Then generated manually a few times and reviewed the spoiler file to confirm that the behaviour is consistent with what should be happening.
If this makes graphical changes, please attach screenshots.
n/a