added main functionality for starting and exiting the game
fixed merge conflict