Revert "while loop causing infinite loop"

This reverts commit 4acfd7e6f8ade9cb533a06059460655ceae794e7.

Conflicts:
src/games.php