Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Stoping the flas!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BiggZigg9




PostPosted: Wed Jan 12, 2011 1:35 pm   Post subject: Stoping the flas!

Hey i am doing a project in school. Its a pong game . I just started and things are getting a little flashy ans sketchy. Anyone know a way to solve my problem?

var x,y,a,c :int
x:= 15
y:= 0
a:= 629
c:= 0
var player1 : string
var player2 : string
var chars : array char of boolean
put "Enter player 1s name"
get player1
put "Enter player 2s name"
get player2
cls
loop
Draw.ThickLine(0,9,639,9,7,7)
Draw.ThickLine(0,330,639,330,7,7)
Input.KeyDown (chars)
drawfillbox(x,y,25,y+70,40)
if chars (KEY_UP_ARROW)
then y+=3
delay(8)
cls
end if
if chars (KEY_DOWN_ARROW)
then y+=-3
delay(8)
cls
end if
drawfillbox(a,c,619,c+70,9)
if chars ('w')
then c+=3
delay(8)
cls
end if
if chars ('s')
then c+=-3
delay(8)
cls
end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jan 12, 2011 2:45 pm   Post subject: RE:Stoping the flas!

You don't really need to have more than one cls.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: Wed Jan 12, 2011 2:50 pm   Post subject: RE:Stoping the flas!

What he does really need to do is search the Turing Help forum for 3 seconds to find out that this question has already been answered about a billion times.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: