The problem was that the read only char*z[] was being written to. This caused a crash which prevented the delightful program from working. The fix was to change it to 'char z[][100]'. But why not a smaller number when the longest string is < 100? Because a smaller number caused strange output and it was easier to do than find the right value: 100 is that big and it works well so why bother finding the smallest value? No other reason behind it. Fixed the shell script too so that it actually works okay (related to '.' not being in the path in modern systems). Updated README.md: moved the ttt.sh related things to new try section and gave an example run (a losing example, challenging users to cause a draw or better yet win as well as asking them to test something about the game). Added a fun parody to the README.md too. Check it out! Removed this entry from bugs.md.
27 lines
1.5 KiB
C
27 lines
1.5 KiB
C
a(X){/*/X=- a(X){/*/X=-
|
|
-1;F;X=- -1;F;X=-
|
|
-1;F;}/*/ -1;F;}/*/
|
|
char z[][100]={"char z[][100]={","a(X){/*/X=-","-1;F;X=-","-1;F;}/*/","9999999999 :-| ",
|
|
"int q,i,j,k,X,O=0,H;S(x)int*x;{X+=X;O+=O;*x+1?*x+2||X++:O++;*x=1;}L(n){for(*",
|
|
"z[i=1]=n+97;i<4;i++)M(256),s(i),M(128),s(i),M(64),N;X*=8;O*=8;}s(R){char*r=z",
|
|
"[R];for(q&&Q;*r;)P(*r++);q&&(Q,P(44));}M(m){P(9);i-2||P(X&m?88:O&m?48:32);P(",
|
|
"9);}y(A){for(j=8;j;)~A&w[--j]||(q=0);}e(W,Z){for(i-=i*q;i<9&&q;)y(W|(1<<i++&",
|
|
"~Z));}R(){for(k=J[*J-48]-40;k;)e(w[k--],X|O);}main(u,v)char**v;{a(q=1);b(1);",
|
|
"c(1);*J=--u?O?*J:*v[1]:53;X|=u<<57-*v[u];y(X);K=40+q;q?e(O,X),q&&(K='|'),e(X",
|
|
",O),R(),O|=1<<--i:J[*J-48+(X=O=0)]--;L(q=0);for(s(i=0);q=i<12;)s(i++),i>4&&N",
|
|
";s(q=12);P(48);P('}');P(59);N;q=0;L(1);for(i=5;i<13;)s(i++),N;L(2);}",0};
|
|
b(X){/*/X=- b(X){/*/X=-
|
|
-1;F;X=- -1;F;X=-
|
|
-1;F;}/*/ -1;F;}/*/
|
|
int q,i,j,k,X,O=0,H;S(x)int*x;{X+=X;O+=O;*x+1?*x+2||X++:O++;*x=1;}L(n){for(*
|
|
z[i=1]=n+97;i<4;i++)M(256),s(i),M(128),s(i),M(64),N;X*=8;O*=8;}s(R){char*r=z
|
|
[R];for(q&&Q;*r;)P(*r++);q&&(Q,P(44));}M(m){P(9);i-2||P(X&m?88:O&m?48:32);P(
|
|
9);}y(A){for(j=8;j;)~A&w[--j]||(q=0);}e(W,Z){for(i-=i*q;i<9&&q;)y(W|(1<<i++&
|
|
~Z));}R(){for(k=J[*J-48]-40;k;)e(w[k--],X|O);}main(u,v)char**v;{a(q=1);b(1);
|
|
c(1);*J=--u?O?*J:*v[1]:53;X|=u<<57-*v[u];y(X);K=40+q;q?e(O,X),q&&(K='|'),e(X
|
|
,O),R(),O|=1<<--i:J[*J-48+(X=O=0)]--;L(q=0);for(s(i=0);q=i<12;)s(i++),i>4&&N
|
|
;s(q=12);P(48);P('}');P(59);N;q=0;L(1);for(i=5;i<13;)s(i++),N;L(2);}
|
|
c(X){/*/X=- c(X){/*/X=-
|
|
-1;F;X=- -1;F;X=-
|
|
-1;F;}/*/ -1;F;}/*/
|