Created the main game loop and started writing the game's states.