fixes some incorrect variables, makes the game work, is unplayable due to infinite while loop