In this topic I'd like to write my methods of solving a particular problem and discuss with you how it could be made more easily and properly.
The first task:
We need to make that if we press ''Space'' sprite moves up to 64 pixels, and then if we press ''Space'' again it returns to the original position (moves down to 64 pixels) and so all the time.
I made it by 3 methods:
These two methods work but not properly � when I run the application and press ''Space'' the first time nothing happens. But if I press it again � sprite moves and events begin to work .
Question: why it doesn't work the first time?
This method works fine.
Question: is there any way to accomplish the task easier ?