(I can't help but wonder where and how 2048 will show up next.)
2048 As A Service
11–20 of 54 posts
Re: 2048 As A Service
#12Re: 2048 As A Service
#13Not sure if I'm doing it right, but http://2048.semantics3.com/2048/ (their mvp) just returns {"message":"Please say hi..."}
Type curl -L http://2048.semantics3.com/hi/start to get started. Here is a full example on how to play it:
https://github.com/Semantics3/2048-as-a-service#full-example...
If you want a full game on the console:
perl -e 'my $host = "http://2048.semantics3.com/hi/";my $cmd = "curl --silent -L $host"."start";my $output = `$cmd`;my $session_id = $output;$session_id=~s/.*?ID:\s(\w+).*/$1/si;my %keyMap = ( 'w' => 0, 'd' => 1, 's' => 2, 'a' => 3);print STDERR $output,"\n";while(1) { print STDERR "Input (w - up, a - left, d - right, s - down):\n"; my $userInput = ; chomp ($userInput); if(defined($keyMap{$userInput})) { $userInput = $keyMap{$userInput}; } else { print STDERR "Invalid move.. w - up, a - left, d - right, s - down\n"; next; } my $cmd = "curl --silent $host"."state/$session_id/move/$userInput"; my $output = `$cmd`; print STDERR "\n$output\n"; if($output=~/Message:/si) { exit(0); }}'Re: 2048 As A Service
#14Not sure if I'm doing it right, but http://2048.semantics3.com/2048/ (their mvp) just returns {"message":"Please say hi..."}
This is actually documented in the API. Turns out the API just wants your program to be polite and say hi when calling it. https://github.com/Semantics3/2048-as-a-service#zest-princip...
Re: 2048 As A Service
#15This is hilarious. This probably won't be, but should be the final entry in the series of 2048 clones. I guess that you could de-servicify it and create own2048, not that I know how it would differ from the original version...
Re: 2048 As A Service
#16Re: 2048 As A Service
#17You might as well open up a SSH daemon on the default port without root password.
Re: 2048 As A Service
#18Re: 2048 As A Service
#19Re: 2048 As A Service
#20I remember I used to play hangman by texting letters to a phone number and it would reply with how much of the word I had figured out. It would be awesome to be able to play 2048 over SMS (but painstakingly slow to complete).
Requires some 1D to 2D though.