How do I make my Pacman move in Turing?

1 answer

Answer

1164434

2026-02-05 11:30

+ Follow

You will need to use the arrow keys.

drawfillarc (x, y, 20, 20, 230, 310, white)

y := y - 5

pacstate := true

end if

elsif chars (KEY_UP_ARROW) then

if pacstate = true then

drawfilloval (x, y, 20, 20, yellow)

y := y + 5

pacstate := true

else

drawfilloval (x, y, 20, 20, yellow)

drawfillarc (x, y, 20, 20, 70, 120, white)

y := y + 5

pacstate := false

end if

else

drawfilloval (x, y, 20, 20, yellow)

end if

View.UpdateArea (x - 45, y - 45, x + 45, y + 45)

drawfilloval (x, y, 45, 45, white)

delay (120)

end loop

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.