Computer Science Canada Turing Contest 255chr max - changed to 20 line max |
Author: | beard0 [ Sun Jun 20, 2004 4:47 pm ] |
Post subject: | Turing Contest 255chr max - changed to 20 line max |
Make the program that is voted "best" in 255 chars or less in Turing - white space not included in character count, so format it nicely. Voting criteria will be purely up to the voter - whichever program they feel deserves the credit. Contest will close July 10th. |
Author: | zylum [ Sun Jun 20, 2004 5:44 pm ] |
Post subject: | |
IMO it shouldnt be characters because then ppl will use var names like a b c etc... it should be either the size of the stand alone or the line count... i say it should be up to 20 lines... |
Author: | Tony [ Sun Jun 20, 2004 6:07 pm ] |
Post subject: | |
i'm in favour of 20 line rule |
Author: | beard0 [ Sun Jun 20, 2004 7:31 pm ] |
Post subject: | |
20 lines, after F2 is hit, it is then. |
Author: | bugzpodder [ Sun Jun 20, 2004 8:13 pm ] | ||
Post subject: | |||
I did not make this but this is so cool i decided it to cut it down to twenty lines (it was like forty) again, i take no credit for the original code
|
Author: | Paul [ Sun Jun 20, 2004 9:05 pm ] |
Post subject: | |
Nice Now, is that just a cool visual effect or does it have some significance that I don't know about? |
Author: | zylum [ Mon Jun 21, 2004 12:30 pm ] | ||||
Post subject: | |||||
wow, that's really cool. you guys remember the one me, catalyst, jonos and paulbian had? well jonos and paulbian didnt submit so i guess it was just me and catalyst.... mine:
catalysts: (bit of a rip off but still cool)
maybe we should make this one have a theme too? maybe fire? |
Author: | Catalyst [ Mon Jun 21, 2004 1:19 pm ] | ||
Post subject: | |||
whee
|
Author: | beard0 [ Mon Jun 21, 2004 3:23 pm ] |
Post subject: | |
Catalyst: Nice job with the function so that you could put multiple calls on the same line, good thinking. |
Author: | GlobeTrotter [ Mon Jun 21, 2004 3:35 pm ] | ||
Post subject: | |||
I made yours a bit smaller. |
Author: | beard0 [ Wed Jun 23, 2004 7:46 am ] | ||
Post subject: | |||
Here's mine. Didn't know it was going to be as interesting as it was, compressing it into a mere 20 lines. Keep posting more programs!
/**** This is what my if statements above accomplish, through mathematical "ifs", to save lines: **** (sign(x-y)+1)/2 is 1 when x>y and 0 when x<y, so by multiplying one by the value I'm trying **** to achieve in one circumstance, plus the other times the value I want in that circumstance I **** either get 0*val1+1*val2 or 1*val1+0*val2. By combining these, you can actually specify ranges, **** so if I had a lot of time on my hands, I *could* have done it without any if statements - but my **** RGB.SetColour line would have been huge. if i < 42.5 then RGB.SetColour (i, 1, i / 42.5, 0) elsif i < 85 then RGB.SetColour (i, 1 - (i mod 42.5) / (42.5), 1, 0) elsif i < 127.5 then RGB.SetColour (i, 0, 1, (i mod 42.5) / (42.5)) elsif i < 170 then RGB.SetColour (i, 0, 1 - (i mod 42.5) / (42.5), 1) elsif i < 212.5 then RGB.SetColour (i, (i mod 42.5) / 42.5, 0, 1) else RGB.SetColour (i, 1, 0, 1 - (i mod 42.5) / 42.5) end if */ |
Author: | Delos [ Wed Jun 23, 2004 10:08 pm ] | ||
Post subject: | |||
[demoic laugh] Ha ha ha ha ha!!!!! [/demoic laugh] You all with your graphical impressions! I present you all with an interactive game! Ha! Fully functioning! 20 lines! Bloody tight coding! It hurt my head making this. And I've finished school. My head shouldn't be hurting for something like this. But it did. And it works! I present to you...BlackJack in 20 Lines! (Sorry, no nice graphics...I can only do so much in 20 lines!)
[Muwahahahahahahahaha] I can just feel it...someone is going to do all of this in like, 12 lines...and totally make me look the fool...meh! |
Author: | zylum [ Wed Jun 23, 2004 11:43 pm ] | ||
Post subject: | |||
im sure some of you have seen me post this before but i shortened it down a bit and made it better too:
|
Author: | beard0 [ Thu Jun 24, 2004 12:38 pm ] | ||
Post subject: | |||
Delos wrote: [demoic laugh]
Ha ha ha ha ha!!!!! [/demoic laugh] You all with your graphical impressions! I present you all with an interactive game! With a challenge like that, I had to rise to it. To counter Delos's "Black Jack" in which the computer only draws when you do, and you even get to see exactly what the computer has, I produce the mouse controlled TicTacToe game, in 20 lines. Th demonic laugh is now mine
Yes, maybe my "exit when" line is a little long - but it is one line! |
Author: | Tony [ Thu Jun 24, 2004 2:38 pm ] |
Post subject: | |
wow beard0, that's impressive +20Bits |
Author: | Delos [ Thu Jun 24, 2004 3:07 pm ] |
Post subject: | |
Hmf. I shall have to counter that counter now... BTW, I made a slight edit to the Black Jack up there...now to win you have to be above 16 points |
Author: | beard0 [ Thu Jun 24, 2004 3:51 pm ] | ||
Post subject: | |||
Delos: I pre-counter your counter counter: TicTacToe is down to 17 lines:
|
Author: | Delos [ Thu Jun 24, 2004 4:17 pm ] | ||
Post subject: | |||
That's awsome beard0! Ok, I present to you... Flashy Pong in Twenty Lines!
You'll notice the lack of delays...that really screwed me up... And yes, I know that a siezure warning is pertinent here. So... WARNING! THE ABOVE CODE WHEN RUN MAY CAUSE SEIZURES. CAUTION IS ADVISED. Urgh...this is...not quite as good as it should be...but there's only so much doable w/ 20 lines! Instructions: Sit a bit farther back from your monitor than you usually do. When the game starts (after pressing F1), the ball will be moving away from you. The paddle has continuous movement. To change its direction, press 'c'. Hold down 'c' to keep it still. Try to keep the ball in play. |
Author: | zylum [ Thu Jun 24, 2004 6:16 pm ] | ||
Post subject: | |||
ok since we're into making games 20 lines or less, here's green screen in 20 lines:
you know the deal, get the screen completely green to win |
Author: | Dan [ Fri Jun 25, 2004 11:41 pm ] | ||
Post subject: | |||
Note: the below outlines a hack that no longer works as the security hole has been fixed in version 7.0 and up of lanschool. I know this is only for turing but i just had to add this: LanSchool Java hack
It truns all the screens of all the computers on the network using LanSchool black Got to have an evil entry. |
Author: | Catalyst [ Fri Jun 25, 2004 11:59 pm ] | ||
Post subject: | |||
whee
|
Author: | Dan [ Sat Jun 26, 2004 12:10 am ] | ||
Post subject: | |||
Another evil java one: this one will reset any Tribes 1 game server thos unbaning you from it and kicking every one off for a few mins: Tribes 1 DoS atack:
I think we need a new contest, java hacks in 20 lines EDIT: of corse you put the server port and ip for the port and add vars |
Author: | zylum [ Sat Jun 26, 2004 1:43 pm ] |
Post subject: | |
lol, nice one catalyst! im beggining to think that the exit when / function that always returns false strategy is a bit cheap (even though i used it myself ) |
Author: | Tony [ Sat Jun 26, 2004 2:35 pm ] | ||
Post subject: | |||
after studing catalyst's code for a bit, I'm resubmitting my snake
|
Author: | Dan [ Sat Jun 26, 2004 2:57 pm ] |
Post subject: | |
An update on my Tribes server DoS, it will also work on hallflife servers and i think any game that is a mod of halflife (ie. counter strike). Also it may wrok on some other game servers like some of the unrealtrerment ones and some other games i have not test. There is much pointel for evil here |
Author: | Delos [ Sat Jun 26, 2004 2:59 pm ] |
Post subject: | |
!! I am so not worthy... ... But I will make myself thus! Ha ha! |
Author: | beard0 [ Sun Jun 27, 2004 6:58 pm ] |
Post subject: | |
Catalyst: I'm very impressed with your pong game. One improvement that you should be able to manage would be to have the ball bounce on its edge rather than its center. |
Author: | Catalyst [ Sun Jun 27, 2004 7:14 pm ] | ||
Post subject: | |||
quite simple to fix
|
Author: | TheFerret [ Sun Jun 27, 2004 10:25 pm ] | ||||
Post subject: | |||||
Here is 2 of my short programs, I know one is a tid bit longer but it looks good...
|
Author: | Delos [ Mon Jun 28, 2004 11:12 am ] |
Post subject: | |
The 2nd one is over 20 lines! (The first one is too...but if one disregards the unnecassary comments in the beginning...) |
Author: | TheFerret [ Sat Jul 03, 2004 12:45 am ] |
Post subject: | |
I know the second one is longer but it looks pretty good and I thought comments don't count... |
Author: | Andy [ Sun Jul 04, 2004 3:38 am ] |
Post subject: | |
i think bugz/catalyst should win |
Author: | Tony [ Sun Jul 04, 2004 11:45 pm ] |
Post subject: | |
learn to read dodge (love martin) bugzpodder wrote: I did not make this |
Author: | Andy [ Mon Jul 05, 2004 12:38 am ] |
Post subject: | |
i read that.. if we can rip movies/apps off bit torrent legally in canada... i think a lil plagerization isnt bending the rules a bit |
Author: | Dan [ Mon Jul 05, 2004 12:51 am ] |
Post subject: | |
hey what about mine? the abity to restart any CS server in 20 lines! it is at least intresting. and the abity to take over landschool in 20 lines is not bad ether . Any how if i had to pick a winner out of the more leagl entrys i whould pick tonys and Catalyst for showing how they can own grade 10 FP in 20 lines. |
Author: | Andy [ Mon Jul 05, 2004 1:00 am ] |
Post subject: | |
well... it did kinda say turing |
Author: | Dan [ Mon Jul 05, 2004 1:02 am ] |
Post subject: | |
pfff minor deatals..... |
Author: | Andy [ Mon Jul 05, 2004 1:03 am ] |
Post subject: | |
heh... y dont u make a thousand line long header file and just include it in c++ |
Author: | Dan [ Mon Jul 05, 2004 1:11 am ] |
Post subject: | |
b/c now that whould be cheating. not my falut java is better for networking. |
Author: | rizzix [ Fri Jul 09, 2004 3:27 pm ] |
Post subject: | |
not only that dan. of course thats true.. but u need to take into consideration statements instead of lines. cuz its possible to write an entire java application in one line.. but it could have 10000+++ statements.. of course i'm sure ur app is pretty low on statements heh. |
Author: | rizzix [ Fri Jul 09, 2004 3:28 pm ] |
Post subject: | |
another thing that makes java so ideal for wirting small programs.. is its chain method calls and anonyous inner classes heh. (an anonymous inner class can be considered one statement. |
Author: | beard0 [ Sat Jul 10, 2004 11:40 am ] |
Post subject: | |
Well, this brings the TURING Contest to a close. A poll should be appearing shortly. |
Author: | beard0 [ Wed Jul 28, 2004 9:44 pm ] |
Post subject: | |
Come on guys, vote for the winner! At least everyone who has made a post here should be voting! |
Author: | Homer_simpson [ Wed Nov 03, 2004 12:04 am ] |
Post subject: | |
no comment... View.Set ("offscreenonly") colorback (black) var x, y, z, rs : array 1 .. 100 of real proc rotate (OriginX, OriginY : real, var secondpartX, secondpartY : real, Rotaion : real) secondpartY := OriginY - (((OriginY - secondpartY) * cosd (Rotaion)) - ((OriginX - secondpartX) * sind (Rotaion))) secondpartX := OriginX - (((OriginX - secondpartX) * cosd (Rotaion)) + ((OriginY - secondpartY) * sind (Rotaion))) end rotate for i : 1 .. 100 x (i) := Rand.Int (-100, 100) y (i) := Rand.Int (-100, 100) z (i) := Rand.Int (101, 301) end for loop for i : 2 .. 100 drawline (round (x (i - 1) / (z (i - 1) / 100)) + 320, round (y (i - 1) / (z (i - 1) / 100)) + 200, round (x (i) / (z (i) / 100)) + 320, round (y (i) / (z (i) / 100)) + 200, white) rotate (0, 200.5, x (i), z (i), 1) end for View.Update cls end loop |
Author: | josh [ Wed Nov 03, 2004 9:40 am ] |
Post subject: | |
wow, that is sick homer!!!!!!!!!!!!!! |
Author: | Hikaru79 [ Thu Nov 11, 2004 11:09 pm ] |
Post subject: | |
Holy crap! beard0, add homer to the poll, I am so voting for him! Man, is homer the undisputed master of 3d around here? =) |
Author: | apomb [ Fri Nov 12, 2004 1:23 am ] | ||
Post subject: | |||
hey i didnt see this before, i could have put my parametric program here... well i modded it, alot shorter, catalyst: do your damndest to make it better... im serious, please
ha! only 19 lines |
Author: | Cervantes [ Sun Nov 21, 2004 7:46 am ] | ||
Post subject: | |||
ha! your program in 13 lines EDIT: woops, forgot the code
|
Author: | apomb [ Mon Nov 22, 2004 12:47 pm ] |
Post subject: | |
WOW! i knew it could be don simpler ... now make it go the other way too ... in less than 20 lines! Thats some nifty coding there Cervantes ... just some for loops how foolish of me to not realise their power! |
Author: | MyPistolsIn3D [ Tue Nov 23, 2004 6:53 pm ] |
Post subject: | |
wow, lotsa sweet programs. I like catalyst's one with the waves going out the best. |
Author: | Tony [ Sun Nov 28, 2004 11:56 pm ] |
Post subject: | |
Cervantes's gravity has been slip off to here |
Author: | TheZsterBunny [ Fri Feb 04, 2005 6:21 am ] | ||
Post subject: | |||
Ferret, you're cured. I've narrowed your code down to 19 lines
|
Author: | Martin [ Fri Feb 04, 2005 1:29 pm ] | ||
Post subject: | |||
Even shorter. 11 lines |
Author: | TheZsterBunny [ Fri Feb 04, 2005 11:33 pm ] | ||
Post subject: | |||
/me bows in respect. um...
10 lines. -Z |
Author: | apomb [ Sat Feb 05, 2005 6:26 pm ] |
Post subject: | |
seems that you both posted before you tried your code ... that code does not work. it only draws a blue outline |
Author: | josh [ Sat Feb 05, 2005 11:24 pm ] |
Post subject: | |
I was wondering about that also..... |
Author: | TheZsterBunny [ Sun Feb 06, 2005 4:16 pm ] | ||
Post subject: | |||
lol. i never tried it. correct. Anyways;
6 lines, same effect, same numbers. Beat that martin. -Z |
Author: | Tony [ Fri Feb 11, 2005 10:41 pm ] | ||
Post subject: | |||
John offered an interesting challange of drawing a checkerboard..
Posting this up here just for future references |
Author: | zylum [ Sat Feb 12, 2005 1:35 pm ] |
Post subject: | |
you could always do it with a single line using fillpolygon but then again you wouldnt be able to control dimensions easily |
Author: | apomb [ Wed Feb 16, 2005 11:30 pm ] |
Post subject: | |
just change the "Box" to "Mapleeaf" and "black" to "12" and you got yourself a nice patriotic bandana ... same effect if use "star" and "colorback (blue) \n cls" for our american friends and by friends, i meant jackasses |
Author: | TheZsterBunny [ Fri Feb 18, 2005 7:40 am ] | ||
Post subject: | |||
3D first person shooter in 1 line.
^_^ may not work for everyone -Z |
Author: | apomb [ Sat Feb 19, 2005 10:26 pm ] |
Post subject: | |
^ good one, doesnt work for me tho, odd |