Re: Funny Moves

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Mon, 20 Nov 2000 21:02:55 -0800, Paul Kerslake <paulk at UNISERVE.COM>
wrote:

>Hi all.
>
>I've been working on a simple program that uses get_key() to "move" a
bitmap. It does this by going through a loop to check if the right key has
been pressed and moves it right or left accordingly in increments of 1.
What I'd like to know, is why when I go "left" three times, then
hit "right" it goes left once more, then right. Why is this? And how can I
fix it?
>
>-Thanks
>-Thomas
>

  Thomas:
     Look at your loop and see where in your loop
     you are checking the key. You may be checking
     the loop after the leftkey is already executed
     and not before.
  Bernie

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu