Computer Science Canada

ping pong

Author:  air_force91 [ Thu Nov 20, 2003 9:11 pm ]
Post subject:  ping pong

I wanted to display a ping pong game...REMEMBER:im a beginner

lol.

loop

put "! $ !"

delay(10)

put "! $ !"

delay(10)

put "! $!"

delay(10)

put "! $ !"

delay(10)

put "! $ !"

end loop


neways...i wanted to know...how could i move just the dollar sign back and forth within the bars (! !) instead of repeating the bars on the screen...thanx...

Author:  AsianSensation [ Thu Nov 20, 2003 10:30 pm ]
Post subject: 

use locate

like this:

code:
loop
    locate (1, 1)
    put "!$  !"
    delay (100)
    locate (1, 1)
    put "! $ !"
    delay (100)
    locate (1, 1)
    put "!  $!"
    delay (100)
    locate (1, 1)
    put "! $ !"
    delay (100)
end loop

Author:  air_force91 [ Fri Nov 21, 2003 1:53 pm ]
Post subject: 

thanx Smile


: