Replaced 'goto' commands in Main with a 'while' loop

The goto were used for the main process of the game, reading and
executing player commands.