fixed bug, made the game loop check if the game is won before exiting out of the loop.