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

Username:   Password: 
 RegisterRegister   
 Seizure in a box, Ch-Ch-Check it out
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
- IzAk -




PostPosted: Fri Jun 02, 2006 11:19 am   Post subject: Seizure in a box, Ch-Ch-Check it out

code:

%J Knudsen
%Music being played
var stopIt : int
stopIt := 0
process playMyMusic
    loop
        Music.Play (">dbdbefdbdbef 4aaacbacbac 1efgefgefg 4bbbad 2gbgbacefefefab 8efefgbgbefefgbgbefagbccc 8abcdabcddefdefabcdabcddefdef ")
        exit when stopIt = 10
    end loop
end playMyMusic
% Animation being played
var r : int
var x, y, deltaX, deltaY : int
fork playMyMusic
r := 20
x := r
y := maxy div 2
deltaX := 9
deltaY := 9

View.Set ("graphics:max,max;offscreenonly")

var r2 : int
var x2, y2, deltaB, deltaC, c : int

r2 := 20
x2 := r2
y2 := maxy div 4
deltaB := 9
deltaC := 9
c :=1
colourback (Rand.Int(1,10))
cls

loop
    Draw.FillMapleLeaf (x, y, r, r, c)


    if y >= maxy - r then
        deltaY := -deltaY
    elsif y < r then
        deltaY := -deltaY
    end if
    if x > maxx - r then
        deltaX := -deltaX
    elsif x < r then
        deltaX := -deltaX
    end if


    delay (-10)
    Draw.FillMapleLeaf (x, y, r, r, c)
    x := x + deltaX
    y := y + deltaY
    Draw.FillMapleLeaf (x, y, r, r, c)
   
    % View.Update

    Draw.FillMapleLeaf (x2, y2, r2, r2, c)
    if y2 >= maxy - r then
        deltaC := -deltaC
    elsif y2 < r then
        deltaC := -deltaC
    end if
    if x2 >= maxx - r2 then
        deltaB := -deltaB
    elsif x2 < r2 then
        deltaB := -deltaB
    end if
    delay (-10)
    Draw.FillMapleLeaf (x2, y2, r2, r2, c)
    x2 := x2 + deltaB
    y2 := y2 + deltaC
    colourback(Rand.Int(1,255))
    cls
    Draw.FillMapleLeaf (x, y, r, r, c)
    Draw.FillMapleLeaf (x2, y2, r2, r2, c)
   
     View.Update
   
     c := (Rand.Int (1,10))
put "falling star"
end loop
%end animation
stopIt := 10
%end music
Sponsor
Sponsor
Sponsor
sponsor
- IzAk -




PostPosted: Fri Jun 02, 2006 11:21 am   Post subject: (No subject)

Yea, um just so you know... don't stare at it to long, it can do some damage..Razz
_justin_




PostPosted: Fri Jun 02, 2006 11:25 am   Post subject: (No subject)

wow you kids have so much time on your hands
Delos




PostPosted: Fri Jun 02, 2006 11:36 am   Post subject: (No subject)

Please read stickies.

This thread is locked
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  [ 4 Posts ]
Jump to:   


Style:  
Search: