made prompt a function, note, game crashes when a blank line is given as imput