optimized game loop, fixed incorrect number of games played, improved formatting