You have been assigned the task of installing new locks to the company's building. However, the locks you use are quite unusual: they require some combination of keys to open. Now, you want to figure out which locks are the most secure, so you can prioritize the most important locations.
The key...
There are n boxes, numbered 1-n. Each box is locked, such that it can be opened by only one corresponding type of key (also numbered 1-n). These keys are randomly scattered in the boxes (one box may have any number of keys, one key may have any number of duplicates), and then all boxes are shut. ...
@l4m2 First calculate which treasures you will get by picking each box (O(VE) time). Now this is a set cover problem, so plug it into your favorite SAT or MIP solver. Should handle N~100 in a fraction of second I believe
Well, movement is now fully working in my game, and I did it the hard way
(calculating the exact distance you can go in your current direction before hitting something, and moving exactly that far, rather than just moving in small increments until you're inside something)
And I also have the hard part I've never tried before, deflecting off surfaces (so if you walk diagonally into a wall along the x-axis, you'll move along it at 1/sqrt(2) speed)
I kinda cheated for circular objects for now tho
You'll just deflect off linearly, rather than wrapping around it in a perfectly circular arc, meaning that technically there can be non-floating-point-error differences in the physics depending on framerate, but that's not a huge deal