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

Username:   Password: 
 RegisterRegister   
 Moving ARROW program
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
@DRI@N




PostPosted: Tue May 25, 2004 5:01 pm   Post subject: Moving ARROW program

This arrow moves to the right with the arrow pointing right and goes off the screen and comes back going left, with the arrow pointing left
(you might have to do it in Chapter 8 so here it is)
code:

%Broken Arrow
%Adrian Todorov
%Created on April 7,2004
%Modified on April 14,2004
%An arrow moving left to right changing directions
%Question #5

setscreen ("graphics")
View.Set ("offscreenonly")

loop            %Loop to keep repeating each For loop

for x : 1 .. maxx+40   %Counted loop for the movement of left-to-right
cls   
delay(5)
    drawline (x+20, 50, x+40, 30, black)
    drawline (x, 30, x+40, 30, black)
    drawline (x+40, 30, x+20, 10, black)
   

View.Update   
end for
delay(5)
for decreasing x : maxx .. 1-40   %Counted loop for the movement of right-to-left
cls
delay(5)   
   

    drawline (x-20, 50, x-40, 30, black)
    drawline (x, 30, x-40, 30, black)
    drawline (x-40, 30, x-20, 10, black)

View.Update   
end for

end loop


Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Tue May 25, 2004 5:27 pm   Post subject: (No subject)

the program works fine, so I'm assuming you don't have any questions related to this program. In that case, this belongs in Turing Source Code, not Turing Help. Rolling Eyes

EDIT: same with all of your other posts, except for the question about shooting a puck
guruguru




PostPosted: Tue May 25, 2004 6:07 pm   Post subject: (No subject)

Source code. #5 Razz Whopee no more :p
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: