Az movement

This is a text-based game. User can view a colored ascii map in their browser and a group of buttons. User can click buttons to determine direction they want their character to move. Characters can circumnavigate world. 
Why did you switch to if/else statements?