Take stdout and stdin as arguments to the TextGameLoop instead of hard-coded