Implementing the walking algorithm used in classic Pokémon G/S/C games.