After I implemented the code for Part A, I ran it and got ... the wrong value. I added a printMap() function to print out the final map, and it matched exactly the final map in the description. Which meant that my score calculation had to be incorrect, somehow. I stared and stared, and stepped through the code, could not figure out how it could possibly be wrong. Then I checked the description again, and discovered that I had copied the expected result incorrectly from the description. So my code actually did work correctly on the first try. For Part B I was pleased with my function to inflate the map, but I ran out of steam while trying to figure out the movement algorithms.
After I implemented the code for Part A, I ran it and got ... the wrong value. I added a printMap() function to print out the final map, and it matched exactly the final map in the description. Which meant that my score calculation had to be incorrect, somehow. I stared and stared, and stepped through the code, could not figure out how it could possibly be wrong. Then I checked the description again, and discovered that I had copied the expected result incorrectly from the description. So my code actually did work correctly on the first try.
For Part B I was pleased with my function to inflate the map, but I ran out of steam while trying to figure out the movement algorithms.