七行プログラミング part2

このエントリーをはてなブックマークに追加
89460cm浮き上がるストレート
○ラクエです。20行もオーバーしてしまいました。どなたか縮めてください。

int a,b,c,d,e,f,g,h,i,j,k,l,m,n,z[6],r,x[9],y[9];char o[][9]={"アリーナ","クリフト"
,"ブライ","スライム","マーマン","トロル","オーク","キメラ","竜王","攻撃","防御","イオ","ホイミ","ヒャド"
,"who?","唱えた","ダメージ","回復","死んだ","敵出現","勝利","クリア","全滅","した",
"に","の","は","を","▼","\x1b[2J"," ","MP不足","\x1b[0m","\x1b[31m",
"\x1b[32m","\x1b[>5h"},q[]="00533",
p[]="vlb:XvlXvvlb:XvlXv:?B06060?:?B06060?SI?5?SNXSA?<2?2:?D234040302";
main(){srand(time(0));S(35);for(r=0;r<=3;r++){S(19);S(28);for(b=3;b<6;b++)
{p[r+b]=p[r+b+9];p[r+b+18]=p[r+b+27];}for(l=0;l/10!=3;){for(b=0;b<3;b++)
{if(p[b]!=48){N();S(b);C(63);C(10);for(c=1;c<4;c++){D(c);C(58);S(8+c+c/3*b);
C(10);}d=getch()-49;x[b]=d+d/2*b;if(d==0||(d==2&&b>0)){C(10);S(14);C(10);
for(c=1;c<4;c++){e=x[b]==3?c-1:r+c+2;if(p[e]!=48){D(c);C(58);S(e);C(10);}}
e=getch()-49;y[b]=x[b]==3?e:r+3+e;}}S(29);}for(b=r+3;b<r+6;b+=p[y[b]]!=48?1:0)
{d=x[b]=rand()%2==0?0:p[b+54]-48;e=rand()%3;y[b]=d==3?r+3+e:e;}for(n=0;n<6;
89560cm浮き上がるストレート:02/09/25 06:22
>>894の続き

n++){z[n]=6;d=rand()%6;z[n]=d>2?r+d:d;for(b=n-1;b>-1;b--)n-=z[n]==z[b]?1:0;}
for(n=0,l=0;n<6&&l/10!=3;n++){b=z[n];if(p[b]!=48){N();d=x[b];S(b);d==0?
(S(25),S(9)):d==1?(S(26),S(10),S(23)):(S(26),S(d+9),S(27),S(15));C(7);C(10);
if(d<2||p[b+18]!=48){p[b+18]-=q[d]-48;e=y[b];f=p[b+36]-p[e+45];f=d==0?f<1?2:f:
d==2?20:d==4?30:0;if(d==2)for(g=b<=2?r+3:0,h=0;h<3;h++)Z(g+h);else Z(e);
for(k=0,l=0;k<r+6;k+=k==2?r+1:1)l+=p[k]==48?k<3?1:10:0;if(l%10==3){S(22);
S(28);exit(1);}if(l/10==3){S(20);S(23);}}else S(31);S(28);}}}}S(21);S(28);}
S(a){printf("%s",o[a]);a==28?(getch(),S(29)):a;}P(a){printf("%3d",p[a]-48);}
D(a){printf("%d",a);}C(a){printf("%c",a);}N(){for(a=0;a<3;a++){S(a);P(a);
P(a+18);C(10);}for(a=3;a<6;a++){S(p[a+r]!=48?a+r:30);C(10);}C(10);}Z(a){
if(p[a]!=48&&d!=1){S(a);if(d%2==0){S(24);m=f*(rand()%4+8)/10;p[a]-=m/=x[a]==1
?2:1;D(m);S(16);p[a]<49?(p[a]=48,C(10),S(18)):a;}if(d==3){S(26);S(17);S(23);
p[a]=p[a+9];}C(10);S(32);for(c=0,m=0;c<3;c++)m+=p[c]<49?4:p[c]<64?1:0;m>3?
S(33):m>0?S(34):m;}}