Comments (4)
I actually got it one byte shorter in the end. :)
I also added snake, merely by replacing that string literal.
from vmtetris.
Thanks for the report. You've got to believe me this used to work great. Something must have changed with getchar()
– it just won't unblock anymore. :(
I found a fix, just add the following to main.c:
int getchar() {
char c;
if (read(0, &c, 1) == 1) return c;
return -1;
}
Alas, the code is not so pretty anymore. I shall see what I can do about that.
from vmtetris.
Thank you! Indeed the shape is not as good as a before. Maybe, you can shape it in the form of a tetromino.
m[444],c,x;g(c){return!!read(0,&c,1)?c:-1;}main(o,a){for(system("stty cbreak \
-echo min 0"),srand(a);o=f();o<42?a=(x=o/2%7)<3?x:x<4?f():x<5?m[f()<23?x:m[x-23]
]:x<6?g():rand()%f(),m[x=o%2?f():m[6]++]*=o<28,a=m[x]+=o>13?a:-a:o<45?putchar(o%
3?o%2*75+f():a):o<63?f(),c=!a^o/54?x+o%9*75:c:usleep(20000));system("stty sane")
;}f(){return x=c++["NCRM7@BD;527e4R37Q<Q9M27e@Q:OQ9MQ9Q;MQ9OMQ;Q9B7MQEQ:Q:OM27e\
^MQEMQ:OQ8KMQEOQ8OMQDMKQ:OMMQDQ:OQ:P7KMQ;OQ:Q927fDP7MMQ8MQ;Q:27fSRE5RE<Q6D952<f\
fR;<Q62<fr[JZ?[a[y`NT=>T?@LD2C^bT<7V<@<gC6K7bn6U7g^68?^^D;?27gjD:=NDTBC27gp@=27\
gv2=P8RE5RF<R;;TL747hB47K25T=9D;9859_lTA:F?:T=9R26FQ9859_lF59@:26hY`?B7`;RI98=9\
bn>D`3N8T@?T>=gxS825=2;h6252<h328k:RI=X66DM6R:9T6AF6A29i]X2?T?9F9?F9?RE5RE<TL7=\
27bn2<ivR[5RD<=R9;R97N98L9jM27=2;jD>7k6T5;L558a[25C9T;5>/jl2BT5;T576:7SN456F7jo\
T;52<j=[JZ?[j[wR[5RD<R;;[JZ?[cTL7D_7YZQ[O[O=2;kK25[92<kHn^7[JZ?ZQR35TL9l525kw=2\
5C_Y25l6[9/"]-47;}/************************************************************/
from vmtetris.
Yes, thanks. I think I will take some time later to work it in nicely.
from vmtetris.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vmtetris.