Update main.c

Added the doGame() function which contains the main gameplay logic