
-----------------------------------
air_force91
Thu Nov 20, 2003 9:12 pm

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...

-----------------------------------
thoughtful
Thu Nov 20, 2003 10:14 pm


-----------------------------------
Bro you should stop posting 2 topics and try doing some work on your own. Or you will get the turing gurus mad  :evil:  :evil:  :evil:

-----------------------------------
Mazer
Thu Nov 20, 2003 10:24 pm


-----------------------------------
try this:

var pos := 0 % position of the ball
var move := 1 % 1 = move right, -1 = move left

loop
    put "!", repeat (" ", pos), "$", repeat (" ", 5 - pos), "!" 
    % put the !, then a number of spaces equal to the space between the left paddle and the ball, then the ball, and more space, then the right paddle
    delay (60) % 10ms is pretty short, for something so simple a bigger delay is better
    cls

    pos += move % increase the position by move (so, if move is negative, the ball moves to the left)
    if pos = 0 or pos = 5 then % if the ball hits a paddle, switch the direction
        move *= -1
    end if
end loop


thoughtful, i'm guessing the double post was a bug in the forum. and as for the program he did try doing it on his own.

-----------------------------------
AsianSensation
Thu Nov 20, 2003 10:32 pm


-----------------------------------
lol, I didn't even notice there were two posts...

anyways, Mazer did it the smart way, he actually thought about it, if you want to learn how to problem solve, use his, otherwise, if you are lazy, use mine, it's so much simpler when it comes to understanding. :P

-----------------------------------
Mazer
Thu Nov 20, 2003 10:37 pm


-----------------------------------
yeah, yours is much simpler asian, but i don't like to use locate. i don't really know why...

-----------------------------------
thoughtful
Fri Nov 21, 2003 12:33 am


-----------------------------------
Hey i am sorry for  criticising you airforce man....didnt know it was a bug.

-----------------------------------
morgoth
Sun Nov 23, 2003 9:37 am


-----------------------------------
LOL I was just thinking about the locate command and how much I hate it as well LOL :D 

-CHEERS!

-----------------------------------
air_force91
Sun Nov 23, 2003 12:03 pm


-----------------------------------
wow...u got it all wrong...seriously...i only posted once...and i do my work on my own...is it a crime to ask ppl better than u out there for some help? and second of all...im not a "bro" or a "man"...im a girl...seriously...are only boys interested in planes and airforce? :roll:

-----------------------------------
rizzix
Sun Nov 23, 2003 12:05 pm


-----------------------------------
actually its not the planes and airforce.. its compsci.

-----------------------------------
thoughtful
Sun Nov 23, 2003 6:54 pm


-----------------------------------
LOL, its actually very rare to find girls here. Now tony might give you better attention if you are hot cause he told me his school doesn't has a lot of em  :P  :P  :twisted:  :twisted:

-----------------------------------
Andy
Sun Nov 23, 2003 6:56 pm


-----------------------------------
who's a girl?

-----------------------------------
thoughtful
Sun Nov 23, 2003 7:01 pm


-----------------------------------
airforce_91

-----------------------------------
Tony
Sun Nov 23, 2003 7:03 pm


-----------------------------------
umm... yeah... its true :lol:

-----------------------------------
air_force91
Sun Nov 23, 2003 8:44 pm


-----------------------------------
u know...seriously...girls are interested in programming as well...ughhh... :roll: ....

-----------------------------------
Tony
Sun Nov 23, 2003 9:50 pm


-----------------------------------
girls are interested in programming as well

umm... no :? not to my knowledge :think:

-----------------------------------
thoughtful
Sun Nov 23, 2003 10:49 pm


-----------------------------------
Thoughtful: Earth to Aiforce, Earth to Airforce, do you live in the same universe? :P  :P  :P  :P

-----------------------------------
air_force91
Tue Nov 25, 2003 8:33 am


-----------------------------------
lol...i don't care...im interested in programming
