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

Username:   Password: 
 RegisterRegister   
 Programming Challenge
Index -> Contests
Goto page Previous  1, 2, 3, 4  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Tony




PostPosted: Mon Apr 21, 2003 12:16 am   Post subject: (No subject)

well if its under 200 lines, then I suppose Catalyst would not be able to fit in his 3D engine which opens up an oportunity for Martin and myself Razz

I just dont have time or enough motivation at the moment
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Mon Apr 21, 2003 1:12 am   Post subject: (No subject)

i can fit my engine in 200 lines, im not going to tho
Homer_simpson




PostPosted: Mon Apr 21, 2003 9:47 pm   Post subject: (No subject)

So when's the due date?
Homer_simpson




PostPosted: Mon Apr 21, 2003 9:48 pm   Post subject: (No subject)

and why da hell my avatar doesn't show Mad =Þ
Tony




PostPosted: Mon Apr 21, 2003 10:23 pm   Post subject: (No subject)

due date? well lets see a first submition (i suppose it can be exe, but source code would have to be checked before declearing a winner)

we'll see from there... I think it should be before school ends or something...
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Martin




PostPosted: Tue Apr 22, 2003 8:35 pm   Post subject: (No subject)

Just incase nobody enters, I'm gonna win by default

code:

put "What is your name?"
var name : string
get name :*
put "Your name is ", name, "!!!"
Tony




PostPosted: Tue Apr 22, 2003 9:46 pm   Post subject: (No subject)

and the competition is on! My sujestion is to mark all your submitions with a under 200 lines of code if applicable from now untill beginning of June. Also post a link in here to your under 200 line program (even if its exe, number of lines will be varified in June)

now so that Martin will not get a default win, here's my submition:
code:

var name:string
put "enter your name"
get name
if name = "Tony" then
put "You're cool"
else
put "Your name isn't Tony :("
end if
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DarkHelmet




PostPosted: Thu Apr 24, 2003 5:39 pm   Post subject: (No subject)

Hey, here's something. It's minigolf. Unfortunately, there is only one hole, and it isn't perfect, b/c i had to trim it under two hundred lines.

[code]
colourback (gray)
procedure drawhole1 (intx : int, inty : int, var blnpress : boolean, blnline : boolean)
var intmousex : int
var intmousey : int
var intbutton : int
mousewhere (intmousex, intmousey, intbutton)
Draw.FillBox (100, 75, 150, 375, 2)
Draw.FillBox (150, 250, 250, 375, 2)
Draw.FillBox (200, 250, 250, 75, 2)
Draw.FillBox (250, 200, 375, 75, 2)
Draw.FillBox (300, 75, 375, 375, 2)
Draw.FillBox (100, 70, 95, 380, brown)
Draw.FillBox (95, 375, 255, 380, brown)
Draw.FillBox (295, 375, 380, 380, brown)
Draw.FillBox (300, 375, 295, 200, brown)
Draw.FillBox (250, 375, 255, 200, brown)
Draw.FillBox (250, 200, 300, 205, brown)
Draw.FillBox (95, 75, 155, 70, brown)
Draw.FillBox (150, 70, 155, 250, brown)
Draw.FillBox (200, 70, 195, 250, brown)
Draw.FillBox (150, 250, 200, 245, brown)
Draw.FillBox (195, 75, 380, 70, brown)
Draw.FillBox (375, 70, 380, 380, brown)
Draw.FillOval (335, 350, 5, 5, black)
Draw.FillOval (intx - 2, inty - 2, 4, 4, white)
Draw.Oval (intx - 2, inty - 2, 4, 4, black)
if blnline = true then
Draw.Line (intx - 1, inty - 1, intmousex, intmousey, red)
end if
delay (7)
if intbutton > 0 then
blnpress := true
end if
end drawhole1
procedure getnum (var intnum : int, intx : int, inty : int)
var strnum : string
var chars : array char of boolean
strnum := ""
locate (intx, inty)
loop
Input.Pause
Input.KeyDown (chars)
locate (intx, inty)
put skip
locate (intx, inty)
if chars ('1') then
strnum := strnum + "1"
elsif chars ('2') then
strnum := strnum + "2"
elsif chars ('3') then
strnum := strnum + "3"
elsif chars ('4') then
strnum := strnum + "4"
elsif chars ('5') then
strnum := strnum + "5"
elsif chars ('6') then
strnum := strnum + "6"
elsif chars ('7') then
strnum := strnum + "7"
elsif chars ('8') then
strnum := strnum + "8"
elsif chars ('9') then
strnum := strnum + "9"
elsif chars ('0') then
strnum := strnum + "0"
elsif chars (KEY_ENTER) then
exit
elsif chars (KEY_BACKSPACE) then
if length (strnum) > 1 then
strnum := strnum (1 .. (length (strnum) - 1))
else
strnum := ""
end if
end if
put strnum ..
end loop
intnum := strint(strnum)
end getnum
var intx, inty, intbutton : int
var intmousex : int
var intmousey : int
var intballx : real := 125
var intbally : real := 100
var intpower : int
var intshots : int := 0
var blnpress : boolean := false
var relslope : real
var distance : int
var intdist : real
var inth : int
var intw : int
loop
blnpress := false
loop
View.Set ("offscreenonly")
cls
drawhole1 (intballx div 1, round (intbally), blnpress, true)
if blnpress = true then
mousewhere (intx, inty, intbutton)
exit
end if
View.Update
end loop
View.Set ("nooffscreenonly")
loop
cls
drawhole1 (intballx div 1, round (intbally), blnpress, false)
locate (23, 25)
put "How powerful would you like your shot to be?" ..
getnum (intpower,23, 70)
exit when intpower >= 1 and intpower <= 20
end loop
intshots += 1
intpower := (intpower * 1.5) div 1
inth := inty - intbally div 1
intdist := (intpower ** 3) * 4
intw := intx - intballx div 1
relslope := inth / intw
if inth / intw < 0 then
relslope *= -1
end if
for decreasing i : intpower .. 1
for a : 1 .. i
for x : 1 .. 2
if intdist > 0 then
cls
View.Set ("offscreenonly")
if intw < 0 then
intballx := intballx - .5
if inth > 0 then
intbally := (intbally + (relslope / 2))
elsif inth < 0 then
intbally := (intbally - (relslope / 2))
end if
intdist -= sqrt ((.5 ** 2) + (inth ** 2))
elsif intw > 0 then
intballx := intballx + .5
if inth > 0 then
intbally := (intbally + relslope)
elsif inth < 0 then
intbally := (intbally - relslope)
end if
intdist -= sqrt ((.5 ** 2) + (inth ** 2))
end if
if intballx < 102 then
intw := intw * -1
elsif intballx >= 150 and intballx <= 200 then
if intbally < 250 then
if intbally >= 240 then
if inth < 0 then
inth := inth * -1
end if
else
intw := intw * -1
end if
end if
elsif intballx >= 248 and intballx <= 302 then
if intbally >= 195 then
if intbally <= 205 then
if inth > 0 then
inth := inth * -1
end if
else
intw := intw * -1
end if
end if
elsif intballx >= 373 then
intw := intw * -1
end if
drawhole1 (round (intballx), round (intbally), blnpress, false)
if intbally > 373 or intbally <= 77 then
View.Update
inth := inth * -1
delay (i)
if inth > 0 then
intbally := (intbally + relslope) div 1
elsif inth < 0 then
intbally := (intbally - relslope) div 1
end if
drawhole1 (round (intballx), round (intbally), blnpress, false)
end if
distance := round (sqrt (((intballx - 333) ** 2) + ((intbally - 353) ** 2)))
if distance <= 5 then
if i <= 8 then
exit
end if
end if
put distance
View.Update
delay (40 - i)
end if
end for
exit when distance <= 5
end for
exit when distance <= 5
end for
exit when distance <= 5
View.Set ("nooffscreenonly")
end loop
put "you took ", intshots, "shots."
[/code]
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Thu Apr 24, 2003 5:55 pm   Post subject: (No subject)

that's prity cool for only 200 lines. looks like your in the lead for now Wink
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Thu Apr 24, 2003 6:03 pm   Post subject: (No subject)

thats preaty sweet... and defenetly the lead so far Very Happy

I'd love to see the full version uploaded as exe in submitions
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DarkHelmet




PostPosted: Thu Apr 24, 2003 7:59 pm   Post subject: (No subject)

I'll post it as soon as I write it. Laughing
AsianSensation




PostPosted: Thu May 08, 2003 4:08 pm   Post subject: Christmas Carol

I'm game, I thought I was going to use this code when Christmas comes around, but I guess now is as good as any other time.

I think the indenting is going to be a problem, but if i don't leave them all in one line, then there will be breaks when turing executes the play procedure. But it is well under 200 lines.



christmas carol.t
 Description:

Download
 Filename:  christmas carol.t
 Filesize:  2.36 KB
 Downloaded:  156 Time(s)

Tony




PostPosted: Thu May 08, 2003 4:23 pm   Post subject: (No subject)

AHAHA Surprised Awesome. I think someone was looking for notes to song like that before.

cool, although I dont like X-mas songs...
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
bugzpodder




PostPosted: Thu May 22, 2003 4:37 pm   Post subject: (No subject)

I dont think i've submitted this one. and unfortunately i lost the source. but if i remember correctly, with all the comments i think its around 250-300. lines. but i am not sure.

anywayz, download it by selecting chess at http://www.geocities.com/bugz_podder/

its all pixels, no gif graphics
Grey_Wolf




PostPosted: Sat Jun 07, 2003 2:24 pm   Post subject: dog fight game

i don't think this contest is still going on but regardless i'll enter.

this is dogfight game its a little glitchy and loops forever because i had to cut it down to 200 lines . the controls are the arrow keys and space bar.



basicdfl200.t
 Description:

Download
 Filename:  basicdfl200.t
 Filesize:  5.3 KB
 Downloaded:  160 Time(s)

Display posts from previous:   
   Index -> Contests
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 4  [ 47 Posts ]
Goto page Previous  1, 2, 3, 4  Next
Jump to:   


Style:  
Search: