Solution to CodeCombat's Gridmancer