Why? Your code is 74 lines long (2.34 KB) whereas mine is only 11 lines long (522 bytes). They both draw pretty much the same conclusion aside from mine lacking the walking handler. Program however you want, but condensing code whilst maintaining its overarching functionality and purpose is good practice. It helps remove redundant lines which help improve readability.
[EDIT] I should also note that Pork has produced a much better method than both of ours because his uses some nice mathematics.