#include <time.h>
#include <curses.h>
#define P(A,B,C,D,E) mvaddch(b+A,a+B,(q[y]&C)?D:E);
#define O(A,B,C) case A:if(q[x]&B)C;break;
#define R rand()
#define U 0,1,4,5
#define J(x) (1<<x)
#define V ' '

int r[27]                     ={0,J(0)
,2,1 ,3,J                     (2),5,U,
U,U,U,U},                     u[6]={-1
,j='#';int main(){srand(time(0));for(x
==(x+u[d]                     )/0x31)+
(((x/7)%7                     )==(((x+
u[d])/7)%                     7))==J(1
);l--;}else if(R<R/0x7){do{x=R%0x157;}
;noecho(                      );crmode
();clear                      (/*|*/);
refresh(                      );while(
x>0){move(J(0),60);printw("Level %d",(
x/0x31)+J(0)); q[x]|=J(J(3));for(y=(x/
J(0)+(3*                      (y% 7));
mvaddch(                      J(1)+((y
%7)*3),J                      (1)+(((y

/7)%7)*3                      ),V);P(0
,0,0,0,j                      )P(3,0,0
,J(4),V,                      j)P(J(1)
,0,J(4),                      V,j)P(3,
J(0),J(5                      ),V,j)P(
3,J(1),J(                    5),V, j)}
mvaddch(J                  (1)+((x%7
)*3),J(1)                +(((x/7)%
7)*3),'@')            ;refresh()

,(x+=49,    clear()))O('d',8,(x-=49,clear
()))case   'q':x=-1;break;}}clear();refresh
(/*v*/);   nocrmode ();echo();endwin();if(!
x)printf    ("You Escaped!\n");exit(0);}

The International Obfuscated C Code Contest, 1995. Best Game: Don Dodson

tutti i testi pubblicati in
(e ospitati da) GAMMM
sono sotto una Licenza
Creative Commons
= all texts (CC) by
m.giovenale, m.guatteri,
a.raos, m.zaffarano & hosts.
/ if not specified,
all photos are (CC) by m.giovenale /

gammm is a non-profit site.
to support us you can donate
anything you want: paper,
used computers, money, manors.
feel free to make us rich,
and tell us how: email us:
gammm_redazione [at] yahoo [dot] it

! thank you !