Move 1988-2004 entries into subdirs
We we move 1988-2004 entries from all of a year's winning entries in a single directory to each winner being in their own sub-directory under the given year directory.
This commit is contained in:
1 parent
1e82e8aa3e
commit
d2a42f42e8
478 files changed
No files matched your search
@@ -0,0 +1,67 @@
|
||||
#include<curses.h>
|
||||
#include<stdlib.h>
|
||||
#include<unistd.h>
|
||||
#define E x/Y
|
||||
#define F x%Y
|
||||
#define P( o , O , t ) move ( o + 3 , O + 3 ) ; addch ( t );
|
||||
#define I(n) ( 2 * ( n / ( X + Y ) ) - 1 + ( ( n % ( X + Y ) - X ) < 0 ? 1 :2))
|
||||
#define D(T) switch(I(p)){ case 3:P(2*(X+Y)-1-p,-2,T); break; case 2:P(Y+1,2*X\
|
||||
+ Y-p -1, T); break; case 1:P(p-X, 1 +X, T); break; case 0: P( -2, p, T); }
|
||||
#define R for(x=0; x<X*Y; x++){ P(F,E,(L[E][F]>84)?42:L[E][F]); } move(5+Y,2) \
|
||||
; clrtoeol(); printw("score: %d", s); move(0, 0); clrtoeol() ; refresh() ;
|
||||
|
||||
int main(int t, char *u[]) { char c, *C="POOT", L[99
|
||||
][ 99
|
||||
]; int X, Y, n, x, a, b, A, B, p, s, S ; X = Y= p=
|
||||
s= 0; if (t
|
||||
== 3) { X=
|
||||
atoi ( u[ 1])
|
||||
; Y = atoi(u[2]); } if
|
||||
(X <6
|
||||
|| X > 98|| Y > 98 ||
|
||||
|
||||
Y < 6 ) { X = 15 ; Y = 12; }
|
||||
initscr (); for
|
||||
(x =0; x < X * Y; x++ ){
|
||||
L[ E][F ]=32 ; P
|
||||
(- 1, E, 45
|
||||
); P( Y, E,
|
||||
45 ); P (F,- 1,
|
||||
124 ); P(F, X, 124); } P(
|
||||
-1, -1, 43); P(
|
||||
-1, X, 43) ; P(Y, -1, 43 ) ;
|
||||
|
||||
P(Y,X,43); c=C[random()%4];
|
||||
D(c); R ; for(;
|
||||
; ) { switch (x = getch ()
|
||||
){ case 97 : D(
|
||||
32 ); if (--
|
||||
p< 0) p= (X
|
||||
+Y )*2-1; break; case
|
||||
115 : D(32); if (++p > (X
|
||||
+Y)* 2- 1) p =0
|
||||
; break ; case 100: a = ( (
|
||||
n=I(p))%2)
|
||||
?X +(
|
||||
n/2)*( 1-
|
||||
X) -1
|
||||
:( 1-
|
||||
n)*p+(n/2)*(2*X+Y-1); b = (n%2)?((n/2)?(2* (X
|
||||
+Y )-
|
||||
p-1): (p-X)) :Y+ ((2-n) /2) *(1-Y)-1; if(L [a
|
||||
][ b]
|
||||
!= 32
|
||||
)break ; A
|
||||
=( n%
|
||||
2)?n-2:(n-
|
||||
|
||||
1)*((c%3-1)*-1); B=(n%2)?(n-2)*((c%3-1)*(-1)):(n-1)*-1; D(32); for(; ; ){ P(b,
|
||||
a,32); if((!a)&&A<0)if(!B){ A=0; B=1; } else A*=-1; if((!b)&&B<0)B*=-1; if(( a
|
||||
==(X-1))&&A>0)if(!B){ A=0; B=1; } else A*=-1; if(((b==(Y-1))&&B>0)||(L[a+A][b+
|
||||
B]!=32))break; a+=A; b+=B; P(b,a,c); move(0,0); refresh(); usleep(5000); } ++s
|
||||
; L[a][b]=c; c=C[random()%4]; p=0; f:for(S=1,x=0; x<X*Y; x++)for(A=-1; A<2; ++
|
||||
A)for(B=-1; B<2; ++B)for(n=0; n<4; n++){ a=E+n*A; b=F+n*B; if((!(a<X&&b<Y&&a>=
|
||||
0&&b>=0))||((L[a][b]!=C[n])&&((L[a][b]-9)!=C[n])))break; if(n==3)for(n=0; n<4;
|
||||
n++,S*=2)L[E+n*A][F+n*B]+=9; } if(S>1){ R; sleep(1); s+=S; for(x=0; x<X; x++ )
|
||||
do for(n=0,a=Y-1; a>=0; a--){ if(L[x][a]>84)n=1; if(n)L[x][a]=a>0?L[x][a-1]:32
|
||||
; } while ( n ) ; R ; goto f ; } } D ( c ) ; R ; } }
|
||||
@@ -0,0 +1,107 @@
|
||||
Most Fun:
|
||||
|
||||
David Lowe Neil Mix
|
||||
Pootpoot Pootpoot
|
||||
67-D Manchester Street 1490 Sacramento Street #4G
|
||||
San Francisco, CA 94110 San Francisco, CA 94110
|
||||
USA USA
|
||||
|
||||
http://pootpoot.com/
|
||||
|
||||
|
||||
Judge's Comments:
|
||||
|
||||
To build:
|
||||
|
||||
make dloweneil
|
||||
|
||||
To use:
|
||||
|
||||
./dloweneil
|
||||
|
||||
Read the the Author's comments below. We believe that your experience
|
||||
may mirror one of our experiences:
|
||||
|
||||
Originally, I didn't appreciate the game. Then I actually read the
|
||||
description of the controls. I started playing. I struggled.
|
||||
I spelled my first "poot". I was hooked ...
|
||||
|
||||
|
||||
Selected Author's comments:
|
||||
|
||||
Usage:
|
||||
pootris [X size of board] [Y size of board]
|
||||
|
||||
Synopsis:
|
||||
The object of this game is to spell "POOT" as much as possible. There
|
||||
is no time pressure. You're given one letter at a time (sort of randomly
|
||||
chosen from the set 'P', 'O', and 'T') and you get to move it freely
|
||||
around the border of the playing board, and decide when and where to drop
|
||||
it into the board. Sound easy? Of course, there's a catch...
|
||||
|
||||
Controls:
|
||||
. Only three controls:
|
||||
'a' moves the current letter one position counterclockwise around
|
||||
the border of the playing field.
|
||||
's' moves the current letter one position clockwise around the border
|
||||
of the playing field.
|
||||
'd' drops the current letter onto the board.
|
||||
. To quit, send a fatal signal to the process.
|
||||
|
||||
Rules of motion:
|
||||
. The different letters move in different directions once dropped onto
|
||||
the board:
|
||||
'P' moves diagonally, at a 45 degree angle and in a clockwise
|
||||
direction around the board once dropped.
|
||||
'O' moves in a straight line perpendicular to the border from which
|
||||
it is dropped.
|
||||
'T' moves diagonally, at a 45 degree angle and in a counterclockwise
|
||||
direction around the board once dropped.
|
||||
. The letters bounce off the top and sides of the board. They bounce
|
||||
in a 'natural' way, with the exception that 'O's will fall straight
|
||||
down if they hit a side wall.
|
||||
. The letters stop when they hit another letter or the bottom of the
|
||||
board.
|
||||
|
||||
Rules of spelling:
|
||||
. When you spell 'POOT' on the board, in any direction, the letters
|
||||
comprising the word will disappear, and any letters which may have
|
||||
accumulated above the disappeared letters will 'fall'.
|
||||
. Letters can be used in multiple spellings of 'POOT'.
|
||||
. Chain reactions are possible.
|
||||
|
||||
Rules of scoring:
|
||||
. You get one (1) point for each letter you drop onto the board.
|
||||
. You get a bunch of points for spelling 'POOT'. More if you spell
|
||||
it in more than one way simultaneously.
|
||||
|
||||
Some of the obfuscations:
|
||||
. Several different coordinate systems are used. There's the "real" X
|
||||
by Y system used for curses, the "inside the box" X by Y system used
|
||||
for moving things around and finding instances of "POOT" inside the
|
||||
box, and the position of the current letter, which is a single value
|
||||
from 0 to 2 * xsize + 2 * ysize - 1.
|
||||
. The fact that x%3 is a perfect hash function for x values 'P', 'O'
|
||||
and 'T' is used.
|
||||
. Of course, the code is as hideous as possible, and spells poot for
|
||||
fun (It's also exactly 3217 bytes in length, with exactly 1536
|
||||
counted characters for purposes of this contest.)
|
||||
. Love that modulus operator! Mmmm...
|
||||
. There are some equations used which are really unnecessarily ugly,
|
||||
which served the dual purposes of compacting the code and making it
|
||||
trickier to understand. I'm thinking of the equations used to convert
|
||||
between coordinate systems when dropping pieces into the game board.
|
||||
. Simple and silly ones: short, meaningless (and sometimes misleading
|
||||
(see 'x')) variable names; hard-coded ASCII numeric values used for
|
||||
character constants; using goto for fun and profit; reusing and
|
||||
re-purposing variables in different places.
|
||||
. The game itself is simple, but still weird and quite difficult.
|
||||
|
||||
Some things I wish I could have fit into this, but didn't have the space:
|
||||
. Seeding the random number generator (doh!)
|
||||
. Something to detect when the game is over.
|
||||
. Some kind of scoreboard.
|
||||
. Sound.
|
||||
. Some way of quitting gracefully.
|
||||
|
||||
Good Luck!
|
||||
Reference in new issue
Block a user