Small errors that caused the most headaches? I wrote a function to return the shortest distance between two tiles in a hexagonal grid that would intermittently return a number that was 1 count too small. After literally an entire day of going through the logic step by step in my head with various test cases it turned out to be a '<' instead of a '<=' in one single expression. The worst thing was, when I checked back through my scribblings that I'd done before typing up the function, it was there all along, I'd just mis-copied it. The air was suitably blue for about an hour
Bookmarks