3 ms·
One question, why does this.addRect use the center of a rectangle to define it rather than a vertex? It makes attempting dealing with "native" rectangles rathe
by emeraldd 13y ago
One question, why does this.addRect use the center of a rectangle to define it rather than a vertex? It makes attempting dealing with "native" rectangles rather awkward.
- nwinter 13y agoThat's how all the CodeCombat game engine works (things are positioned by their center points), so because this challenge was taken from an algorithm used in two places in the engine, it maintains that. I know it makes it a bit more complicated to write the code, but it's a lot easier for us to then snatch the winning solution to make CodeCombat faster!