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

Username:   Password: 
 RegisterRegister   
 First turing program...so be nice
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
something




PostPosted: Mon Mar 08, 2004 8:42 pm   Post subject: First turing program...so be nice

Ok so this is my first turing program, its a story...

code:
setscreen ("graphicsv:16")
Pic.ScreenLoad ("untitled.bmp", 0, 0, picCopy)
delay (3000)
cls
colourback (7)
cls
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var c : array 1 .. 3 of int := init (300, 400, 500)
var v : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (c, v, 3, 21)
var n : array 1 .. 4 of int := init (160, 210, 475, 425)
var m : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (n, m, 4, 32)
var name, school : string
colour (60)
put "What is your name: " ..
get name
put "Where are you right now: " ..
get school
put "Hello" ..
put " and " ..
put "Welcome ", name ..
put " Today you will be leaving ", school ..
put " and entering a world of wizards and magic"
delay (3000)
cls
put "THIS IS MY STORY"
delay (3500)
cls
colourback (7)
cls
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var a : array 1 .. 3 of int := init (300, 400, 500)
var s : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (a, s, 3, 21)
var d : array 1 .. 4 of int := init (160, 210, 475, 425)
var f : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (d, f, 4, 32)
put "There was once a magical wizard that lived in a house."
delay (3000)
cls
colourback (7)
cls
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var g : array 1 .. 3 of int := init (300, 400, 500)
var h : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (g, h, 3, 21)
var j : array 1 .. 4 of int := init (160, 210, 475, 425)
var k : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (j, k, 4, 32)
put "One day a dragon decided to attack this wizard's house"
put "This evil dragon blew off the roof of the house"
delay (3000)
Pic.ScreenLoad ("dragon.bmp", 0, 0, picCopy)
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var t : array 1 .. 3 of int := init (300, 400, 500)
var r : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (r, t, 3, 21)
var u : array 1 .. 4 of int := init (160, 210, 475, 425)
var i : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (u, i, 4, 32)
delay (5000)
cls
put "The wizard got tired of putting his roof back over and over again"
put "The tired wizard then got angry " ..
put "so he decided to take care of this problem"
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var e : array 1 .. 3 of int := init (300, 400, 500)
var l : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (e, l, 3, 21)
var q : array 1 .. 4 of int := init (160, 210, 475, 425)
var b : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (q, b, 4, 32)
delay (5000)
drawfillbox (0, 0, 639, 100, 6)
drawfillbox (300, 50, 500, 200, 4)
drawfillbox (325, 125, 375, 175, 0)
drawfillbox (425, 50, 475, 175, 1)
var w : array 1 .. 3 of int := init (300, 400, 500)
var z : array 1 .. 3 of int := init (200, 300, 200)
drawfillpolygon (w, z, 3, 21)
var o : array 1 .. 4 of int := init (160, 210, 475, 425)
var p : array 1 .. 4 of int := init (0, 0, 50, 50)
drawfillpolygon (o, p, 4, 32)
Pic.ScreenLoad ("dragonnobreath.bmp", 0, 300, picCopy)
Pic.ScreenLoad ("wiz1.bmp", 225, 90, picCopy)
delay (300)
Pic.ScreenLoad ("wiz2.bmp", 100, 90, picCopy)
delay (300)
Pic.ScreenLoad ("wiz3.bmp", 0, 90, picCopy)
delay (500)
Pic.ScreenLoad ("boom.bmp", 0, 0, picCopy)
delay (3000)
Pic.ScreenLoad ("theend.bmp", 0, 0, picCopy)



Story.zip
 Description:

Download
 Filename:  Story.zip
 Filesize:  59.56 KB
 Downloaded:  268 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
programer007




PostPosted: Mon Mar 08, 2004 9:41 pm   Post subject: (No subject)

not too bad.... short...but nice....+ 2 bits
Paul




PostPosted: Mon Mar 08, 2004 10:08 pm   Post subject: (No subject)

Pretty good, first program you say? geez I dunno how they teach you ppl there, but for your first program you already learned to use pictures. Where I am, the first thing I made that could be called a "program" is made up of a bunch of puts and gets and ifs. Very Happy
recneps




PostPosted: Tue Mar 09, 2004 6:42 pm   Post subject: (No subject)

Gj man, the first project at our schooll...... draw a stick man! Very Happy Next project, make it all move to the right and not stop on its own.
Its amazing what you can learn in 1 sem Very Happy (Not that you learn THAT much Wink )
something




PostPosted: Tue Mar 09, 2004 8:35 pm   Post subject: (No subject)

Paul Bian wrote:
Pretty good, first program you say? geez I dunno how they teach you ppl there, but for your first program you already learned to use pictures. Where I am, the first thing I made that could be called a "program" is made up of a bunch of puts and gets and ifs. Very Happy


Well not my first per say, the first programs I learned were also with puts and ifs, but I went ahead of everyone in the class, and stayed took a few tutourials on the net, and I learned how to display pics, and draws shapes.

-Sammi
airecrist




PostPosted: Wed Apr 21, 2004 2:29 am   Post subject: (No subject)

the first proggy we were taught in my class was basically how to input your name a print it out, mind you I was only able to take the one semester because I was graduating or should I say already graduated and just wanted to try the course out I liked it and now I wish I had started school at the school I took the course at cause I couldn't go though the whole course. ( if this don't make sense don't be surprised I sometimes have trouble getting my tongue around things, and I graduated with a english major lol)
jdworrow




PostPosted: Sun Apr 25, 2004 9:02 am   Post subject: (No subject)

I know when I made my first program it was a cheasy yahtzee version. It was set that all our class produce a version of it. It was very difficult I might add. But you did well. Congrats.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: