3 ms·
Not sure if I'm doing it right, but http://2048.semantics3.com/2048/ http://2048.semantics3.com/2048/ (their mvp) just returns {"message":"Please say hi..."}
by fragmede 13y ago
Not sure if I'm doing it right, but http://2048.semantics3.com/2048/ http://2048.semantics3.com/2048/ (their mvp) just returns
{"message":"Please say hi..."}
- goldfeld 13y agoI think when they say MVP they might really mean AFJ, which would make the behavior you observed more understandable. Some AFJ purists would even claim it's the right way to do it under the methodology, which is arguably one of its major differences from the MVP credo.
- ojbyrne 13y agohttps://github.com/Semantics3/2048-as-a-service#zest-principles https://github.com/Semantics3/2048-as-a-service#zest-princip... Which seems to suggest April 1 protocol.
- zaptheimpaler 13y agoThis 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-principles https://github.com/Semantics3/2048-as-a-service#zest-princip...
- HCIdivision17 13y agoIt is nice to see the INTERCAL way of doing things making a comeback.
- davidm 13y agoDrop the /2048 from the end of the url and replace it with /hi/start/json It really does appear to respond as advertised! Is this the most elaborate April fool of the day?
- netvarun 13y ago2048-as-a-service author here. Type curl -L http://2048.semantics3.com/hi/start 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-gameplay 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 = <STDIN>; 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); }}'