CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Moving a Circle in a straight line:

declare variables and objects

set up circle at initial position (ask for coordinates)
repeat this sequence:
draw the circle; (place, show, display coordinates)
wait 0.033 seconds;
erase circle
compute next coordinate (increase x coordinate);
 

 

might be a good idea to repeat the whole program.