-
Notifications
You must be signed in to change notification settings - Fork 730
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
Tests: Test that swapper can work out a situation where TWO items need to be swapped "together" #2434
base: main
Are you sure you want to change the base?
Conversation
Gotta love those mspaint skills. |
Absolutely - Do I need to do something for that? |
Hm, it droesn't tell me on gh mobile, but write permission from the target is on by default, so most likely no change required on your end for that. Just wanted to ask before changing your PR - I haven't found time to look for a fix yet though |
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.
Always love more unit tests!
I was wrong about what my own test does. It does still test this case, but in a different way than I intended. Investigating right now. The MSPaint drawing is wrong. The state I have it place itself into, that it can't get out of, is a little different than I described. |
Alright, I've updated the MSPaint drawings. I actually understand now why this specific case fails, which is nice. |
Circles are locations, and the completion condition is having all 5 items. Ok, maybe "useless" wasn't the best descriptor then, Also that "Needs Blue Keys" is supposed to be for both of the locations on the right. Lol the graphics are shite ok what can I say
The situation set up in this test is this:
There is a valid placement, which the test validates first:
Then, the test calls fill_restrictive, which will first set up this placement (because of placement order):
From here, fill needs to swap to work out the rest.
Swap will alternate between these two placements:
And then decide there is no valid placement. Meaning swap is "broken" atm.
The problem can be boiled down to the fact that the "useless" item is in an impossible position, but nothing can swap with it: