2048 in sed
github.com
github.com
___________________
|___2|____|____|____|
|___2|____|____|____|
|___2|____|____|____|
|____|____|____|____|
in the original the result of going up would be ___________________
|___4|____|____|____|
|___2|____|____|____|
|____|____|____|____|
|____|____|____|____|
but in this game it's ___________________
|___2|____|____|____|
|___4|____|____|____|
|____|____|____|____|
|____|____|____|____|how am i suppose to know when i break my own record [i.e. 3012 - never got passed 512 on the tiles]
edit: you broke it :(
As a bonus, the score calculation is now done in pure sed.
If you notice any other issues, please let me know!
The gameplay should now be identical to the original 2048.
The option is there, just different: -E (the same as grep)
They are the de facto standard. Having the need to compile all these basic stuff for any scripting to be portable is a nightmare.
At the end of the day, whether some script works is the issue, not a UNIX branding.
Just joking, I love these and I'm unemployed. Keep'em coming!
It was posted on HN but didn't really take off, sadly: https://news.ycombinator.com/item?id=7434529
1) It looks more like a discovery.
2) It doesn't look like a self promotion.
3) The point of the article is at the beginning. I.e. a certain percentage don't read past "Show HN".
Again, just theories. No idea if this is really the case. But I don't remember many (maybe any) of the other 2048 clones making it to the first page being "Show HN" submissions.
Also, disappointed no one has blatantly embedded https://github.com/progranism/Bitcoin-JavaScript-Miner to put all this time wasting to good u$e.
For who is interested in other games written in sed.
Best part is he uses BSD sed. No newlines as patterns.
We use tr(1) for that.