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

Username:   Password: 
 RegisterRegister   
 i am in highschool, needing help from professionals.please..
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2, 3  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sevendust




PostPosted: Sun Dec 12, 2004 10:22 pm   Post subject: (No subject)

is there a way i can make the stars return, in any random order, or placed by myself??
Sponsor
Sponsor
Sponsor
sponsor
Neo




PostPosted: Sun Dec 12, 2004 10:25 pm   Post subject: (No subject)

Store the coordinates in an array and redraw them.
Cervantes




PostPosted: Sun Dec 12, 2004 10:27 pm   Post subject: (No subject)

An array will work, but it is not the easiest of ways to go.
Trying taking a pic of the star's location at the start of your program (Pic.New I think) then using Pic.Draw in your moon process, before you draw your moon.
sevendust




PostPosted: Sun Dec 12, 2004 10:27 pm   Post subject: (No subject)

how does it redraw them...and the commands you sent me Mr. Cervantes...didnt work on my moon
Neo




PostPosted: Sun Dec 12, 2004 10:33 pm   Post subject: (No subject)

After you draw the house you want to take a picture of the house with Pic.New. Then redraw it in the loop.


house2.t
 Description:

Download
 Filename:  house2.t
 Filesize:  3.41 KB
 Downloaded:  66 Time(s)

sevendust




PostPosted: Sun Dec 12, 2004 10:38 pm   Post subject: (No subject)

THANK YOU VERY MUCH , neo, looks awesome, just as i wanted it to be, thank you...
apomb




PostPosted: Mon Dec 13, 2004 11:15 am   Post subject: (No subject)

um neo ... just to warn you before asiansensation comes along ... giving the whole program like that... not too safe (for yourself)
sevendust




PostPosted: Mon Dec 13, 2004 12:31 pm   Post subject: (No subject)

i was just wondering...why wud it be unsafe for him to send the whole program...all he did was help the last few lines...
Sponsor
Sponsor
Sponsor
sponsor
cool dude




PostPosted: Mon Dec 13, 2004 1:50 pm   Post subject: (No subject)

because firstly the teacher could see and secondly compsci is a site for help not for code given so u could plagarize.
sevendust




PostPosted: Mon Dec 13, 2004 4:54 pm   Post subject: (No subject)

ahhi c, thanks, ill remember that for future reference, if i am one to give help to others...as if lol
thanks
sevendust*
cool dude




PostPosted: Mon Dec 13, 2004 5:50 pm   Post subject: (No subject)

by the ways forks and processes are very bad to use because its hard to get out of them.
AsianSensation




PostPosted: Mon Dec 13, 2004 6:06 pm   Post subject: (No subject)

CompWiz333 wrote:
um neo ... just to warn you before asiansensation comes along ... giving the whole program like that... not too safe (for yourself)


I kinda had my doubts from the first post, the posts by sevendust seems more "asking for code" than "asking for help"

But I could just be paranoid.

So I'll watch until there is a definite sign of plagiarizing, then I'll do the necessary things.
sevendust




PostPosted: Mon Dec 13, 2004 7:28 pm   Post subject: (No subject)

i need help with another thing on my project, i cant figure out how to make the lines stay for the bricks im making for the wall...heres the code , can anyone HELP me get it to stay and not disappear...the very last part is the bricks i cant get to stay, thanks

code:
setscreen ("graphics:800,650")
drawfill (1, 1, black, red)
var x, y, x2, y2 : int
x2 := 600
y2 := 450
drawfillbox (maxx, 0, 0, 300, green)
for i : 1 .. 200
    randint (x, 0, maxx)
    randint (y, 300, maxy)
    drawdot (x, y, white)
end for
% chimney
drawfillbox (130, 480, 165, 380, 23)
drawline (130, 480, 130, 410, grey)  %left
drawline (155, 480, 155, 439, grey)  %right
drawline (165, 450, 165, 480, grey)  %far right
drawline (165, 480, 160, 495, grey)
% front of house
drawfillbox (120, 400, 320, 211, red)
% lines for roof
drawline (100, 380, 215, 500, grey)  %left
drawline (340, 380, 215, 500, grey)  %right
drawline (120, 400, 320, 400, grey)  %bottom
drawline (420, 440, 300, 550, grey)  %far right
drawline (215, 500, 300, 550, grey)  %top
drawline (340, 380, 420, 440, grey)  %ledge
drawfill (360, 460, 115, grey)
% lines for left and right side of house
drawline (120, 211, 120, 400, grey)  %left
drawline (320, 211, 320, 400, grey)  %right
% line for bottom of house
drawline (120, 210, 320, 210, grey)
% filled in front roof
drawfill (250, 410, 115, grey)
% right side of house
drawline (320, 210, 400, 290, grey)  %bottom
drawline (400, 291, 400, 425, grey)  %right
drawfill (340, 350, red, grey)       %color
% door
drawfillbox (195, 212, 240, 280, brown)
% door border
drawline (195, 280, 195, 212, black)
drawline (240, 280, 240, 212, black)
drawline (195, 212, 240, 212, black)
drawline (195, 280, 240, 280, black)
% door knob
drawfilloval (199, 247, 2, 2, black)
% windows
drawfillbox (140, 320, 180, 360, black)
drawfillbox (250, 320, 290, 360, black)
% left window border
drawline (140, 360, 180, 360, white)
drawline (140, 320, 180, 320, white)
drawline (180, 320, 180, 360, white)
drawline (140, 320, 140, 360, white)
% right window border
drawline (250, 360, 290, 360, white)
drawline (250, 320, 290, 320, white)
drawline (290, 320, 290, 360, white)
drawline (250, 320, 250, 360, white)
% driveway


var house := Pic.New (0, 0, maxx, maxy)

% cloud 1
process cl1

    loop
        drawfilloval (120, 520, 20, 20, 23)
        drawfilloval (130, 530, 15, 15, 22)
        drawfilloval (110, 525, 15, 15, 21)
        delay (500)
        drawfilloval (120, 520, 20, 20, black)
        drawfilloval (130, 530, 15, 15, black)
        drawfilloval (110, 525, 15, 15, black)
        delay (1000)
    end loop
end cl1

% cloud 2
process cl2
    delay (1000)
    loop
        drawfilloval (70, 540, 20, 20, 23)
        drawfilloval (80, 550, 15, 15, 21)
        drawfilloval (55, 555, 15, 15, 22)
        delay (500)
        drawfilloval (70, 540, 20, 20, black)
        drawfilloval (80, 550, 15, 15, black)
        drawfilloval (55, 555, 15, 15, black)
        delay (1000)
    end loop
end cl2

% cloud 3
process cl3
    delay (500)
    loop
        drawfilloval (20, 577, 20, 20, 23)
        drawfilloval (30, 588, 15, 15, 21)
        drawfilloval (5, 585, 15, 15, 22)
        delay (500)
        drawfilloval (20, 577, 20, 20, black)
        drawfilloval (30, 588, 15, 15, black)
        drawfilloval (5, 585, 15, 15, black)
        delay (1000)
    end loop
end cl3

fork cl1
fork cl2
fork cl3


process mn
    setscreen ("offscreenonly")
    loop
        Pic.Draw (house, 0, 0, picCopy)
        drawfilloval (x2, y2 + 30, 50, 50, 30)
        drawfilloval (x2 - 20, y2 + 10, 5, 5, 28)
        drawfilloval (x2 - 11, y2 + 30, 5, 5, 26)
        drawfilloval (x2 - 30, y2 + 29, 5, 4, 28)
        drawfilloval (x2 - 4, y2, 4, 5, 27)
        drawfilloval (x2 + 26, y2 + 40, 5, 2, 29)
        delay (1000)
        x2 -= 1
        y2 += 1
        exit when x2 = 148
        View.Update
    end loop
end mn


fork mn

% bricks
var xx := 320
var yy := 400
var xy, yx : int := 0
loop
    drawline (xx, xy + 215, yy, yx + 295, grey)
    xy += 5
    yx += 5
    exit when xy = 345
    exit when yx = 135
end loop
drawline (xx, 350, 380, 410, grey)
drawline (xx, 355, 360, 395, grey)
drawline (xx, 360, 340, 380, grey)
drawline (xx, 365, 337, 382, grey)
drawline (xx, 370, 334, 384, grey)
drawline (xx, 375, 332, 387, grey)
drawline (xx, 380, 330, 390, grey)
drawline (xx, 385, 327, 392, grey)
drawline (xx, 390, 324, 394, grey)
Hikaru79




PostPosted: Mon Dec 13, 2004 7:47 pm   Post subject: (No subject)

AsianSensation wrote:
CompWiz333 wrote:
um neo ... just to warn you before asiansensation comes along ... giving the whole program like that... not too safe (for yourself)


I kinda had my doubts from the first post, the posts by sevendust seems more "asking for code" than "asking for help"

But I could just be paranoid.

So I'll watch until there is a definite sign of plagiarizing, then I'll do the necessary things.


Eh? AsianSensation is the local plagiarism Nazi? Surprised What do you do to 'em, AS? Twisted Evil
Neo




PostPosted: Mon Dec 13, 2004 7:48 pm   Post subject: (No subject)

CompWiz333 wrote:
um neo ... just to warn you before asiansensation comes along ... giving the whole program like that... not too safe (for yourself)


Relax, I added 2 lines to his program and did not "give away the whole program". They werent even difficlut code to use, Pic.New and Pic.Draw Confused
No big deal.
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 2 of 3  [ 34 Posts ]
Goto page Previous  1, 2, 3  Next
Jump to:   


Style:  
Search: