_INPUT is moved : boolean := false; x : integer := x_pos; y : integer := y_pos; input : character; begin input := character'val(bdos(1)); -- obtain user keystroke display(' ',1,16); -- erase user input timer2 := timer2 + 35; -- compensate timer case input is when 'U' | '8' => if y_pos /= 2 and maze(y_pos-1)(x_pos) = ' ' then y_pos := y_pos - 1; moved := true; end if; when 'M' | '2' => if y_pos /= 13 and maze(y_pos+1)(x_pos) = ' ' then y_pos := y_pos + 1; moved := true; end if; when 'H' | '4' => if x_pos /= 2 and maze(y_pos)(x_pos-1) = ' ' then x_pos := x_pos - 1; moved := true; end if; when 'K' | '6' => if x_pos /= 54 and maze(y_pos)(x_pos+1) = ' ' then x_pos := x_pos + 1; moved := true; end if; when character'val(3) | 'Q' | 'q' => end_game; end case; if moved then for i in y_pos-1..y_pos+1 loop for j in x_pos-1