Added code to map between direction chosen and function to move.