-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprog.c
25 lines (24 loc) · 1.53 KB
/
prog.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#define P(a,b,c) a##b##c
#include/*++**++*/<curses.h>
int c,h, v,x,y,s, i,b; int
main () { initscr( ); P(cb,
rea, k)() ;///
P(n, oec, ho)(
)/* */ ;for (curs_set(0); s= x=COLS/2
; P( flu, shi, np)()){ timeout(y=c= v=0);///
P(c, lea, r)() ;for (P (
mva, d, dstr )(2, 3+x,
G) ; ; P( usl, eep, )(U)){//
P(m, vad, dstr )( y >>8,x,//
" "); for(i=LINES; /* */ i -->0
; mvinsch(i,0,0>(~c|i-h-H &h-i )?' '
:(i- h|h- i+H) <0?'|' :'=' ));
if(( i=( y +=v= getch( )>0?I:v+
A)>>8)>=LINES||mvinch(i*= 0<i, x)!=' '||' '
!=mvinch(i,3+x))break/*&% &*/; mvaddstr(y
>>8, x,0>v ?F:B ); i=--s
/-W; P(m, vpr, intw)(0,
COLS-9," %u/%u ",(0<i)* i,b=b<i?i:
b); refresh(); if(++ c==D){ c
-=W; h=rand()%(LINES-H-6
)+2; } } flash(); }}