Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
ping pong
Author Message
air_force91

Posted: Thu Nov 20, 2003 9:12 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...

thoughtful

Posted: Thu Nov 20, 2003 10:14 pm   Post subject: (No subject)

Bro you should stop posting 2 topics and try doing some work on your own. Or you will get the turing gurus mad
Mazer

Posted: Thu Nov 20, 2003 10:24 pm   Post subject: (No subject)

try this:
 code: 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

Posted: Thu Nov 20, 2003 10:32 pm   Post subject: (No subject)

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.
Mazer

Posted: Thu Nov 20, 2003 10:37 pm   Post subject: (No subject)

yeah, yours is much simpler asian, but i don't like to use locate. i don't really know why...
thoughtful

Posted: Fri Nov 21, 2003 12:33 am   Post subject: (No subject)

Hey i am sorry for criticising you airforce man....didnt know it was a bug.
morgoth

Posted: Sun Nov 23, 2003 9:37 am   Post subject: (No subject)

LOL I was just thinking about the locate command and how much I hate it as well LOL

-CHEERS!
air_force91

Posted: Sun Nov 23, 2003 12:03 pm   Post subject: (No subject)

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?

rizzix

Posted: Sun Nov 23, 2003 12:05 pm   Post subject: (No subject)

actually its not the planes and airforce.. its compsci.
thoughtful

Posted: Sun Nov 23, 2003 6:54 pm   Post subject: (No subject)

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
Andy

Posted: Sun Nov 23, 2003 6:56 pm   Post subject: (No subject)

who's a girl?
thoughtful

Posted: Sun Nov 23, 2003 7:01 pm   Post subject: (No subject)

airforce_91
Tony

Posted: Sun Nov 23, 2003 7:03 pm   Post subject: (No subject)

umm... yeah... its true
Tony's programming blog. DWITE - a programming contest.
air_force91

Posted: Sun Nov 23, 2003 8:44 pm   Post subject: (No subject)

u know...seriously...girls are interested in programming as well...ughhh... ....
Tony

Posted: Sun Nov 23, 2003 9:50 pm   Post subject: (No subject)

air_force91 wrote:
girls are interested in programming as well

umm... no not to my knowledge
Tony's programming blog. DWITE - a programming contest.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 17 Posts ]
Goto page 1, 2  Next
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: