Finally, 2048 is now enterprise-ready .
2048 As A Service
31–40 of 54 posts
Re: 2048 As A Service
#32I 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).
Re: 2048 As A Service
#33That "Sexy Perl one-liner" is hilarious.
For reference: 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})…
This will work:
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
#34Re: 2048 As A Service
#352048-as-a-service author here. Do also checkout our demo showcase app built using the 2048-as-a-service API: 2048 - Startup Growth Edition (MVP) - http://2048.semantics3.com/2048.html
Re: 2048 As A Service
#36Earlier quoted context omitted.
For reference: 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})…
HN formatting screws up the code :( This will work: 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 ($userInp…
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
#37Re: 2048 As A Service
#38I get that this is a joke, but I do think a really cool concept for a game would be one where there is just an API for the "state" and that is responsible for the mechanics and rules of the game, but that you would build your own custom client for the UI. For example, some kind of spaceship battle game where you create your own interface for controlling the ship... it would be kind of a meta-game where creating the i…
Re: 2048 As A Service
#39I get that this is a joke, but I do think a really cool concept for a game would be one where there is just an API for the "state" and that is responsible for the mechanics and rules of the game, but that you would build your own custom client for the UI. For example, some kind of spaceship battle game where you create your own interface for controlling the ship... it would be kind of a meta-game where creating the i…
Re: 2048 As A Service
#40I get that this is a joke, but I do think a really cool concept for a game would be one where there is just an API for the "state" and that is responsible for the mechanics and rules of the game, but that you would build your own custom client for the UI. For example, some kind of spaceship battle game where you create your own interface for controlling the ship... it would be kind of a meta-game where creating the i…
I'm just worried in reality it would just mean a flood of a thousand clones in the appstore.