Still needs score, losing state, and collision detection for walls.
If you have node installed, you can do this to play:
curl -Lo snake.js http://bit.ly/1jo72pa
#make sure you got the right file:
cat snake.js
var Minecraft = require('minecraft'); | |
var mc = new Minecraft({ | |
user: 'hello', | |
pass: 'world', | |
salt: 'salty' | |
}); | |
var day = true; |
diff --git a/src/db.c b/src/db.c | |
index 6447838..ad28b1c 100644 | |
--- a/src/db.c | |
+++ b/src/db.c | |
@@ -280,6 +280,31 @@ void keysCommand(redisClient *c) { | |
setDeferredMultiBulkLength(c,replylen,numkeys); | |
} | |
+void countCommand(redisClient *c) { | |
+ dictIterator *di; |
/* | |
Example of achieving compatibility with AMD and standard CommonJS by putting boilerplate around the standard CommonJS module format: | |
*/ | |
(function(define){ | |
define(function(require,exports){ | |
// module contents | |
var dep1 = require("dep1"); | |
exports.someExportedFunction = function(){...}; | |
//... |
var module = (function() { | |
var _private = { | |
i:5, | |
get : function() { | |
console.log('current value:' + this.i); | |
}, | |
set : function( val ) { | |
this.i = val; | |
}, | |
run : function() { |
// include CryptoJS | |
var message = '12345678901234567890123456789012'; | |
var iv = CryptoJS.enc.Utf8.parse('1234567890123456'); | |
var challengeKey = 'fe8844b73775265aef8839bf39de68a5aec6b0f447034472e8ff937bd9046e91'; | |
var key = CryptoJS.enc.Hex.parse(challengeKey); | |
var challenge = CryptoJS.AES.encrypt(message, key, { | |
mode: CryptoJS.mode.CFB, | |
iv: iv |
npm@1.2.10 /usr/local/lib/node_modules/npm | |
~ [ npm install -g express v0.8.18 ] 3:35 PM | |
npm info it worked if it ends with ok | |
npm info using npm@1.2.10 | |
npm info using node@v0.8.18 | |
npm ERR! TypeError: Object info has no method 'verbose' | |
npm ERR! at RegClient.regRequest [as request] (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:43:14) | |
npm ERR! at RegClient.get_ (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:112:8) | |
npm ERR! at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:37:12) |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL), ^(void) { | |
char line[80]; | |
FILE *fr; | |
NSString *path = @"/path/to/long/file"; | |
struct stat info; | |
stat([path UTF8String], &info); | |
off_t lastSize = info.st_size; | |
fr = fopen([path UTF8String], "rt"); |
~ → cat testConnection.js | |
var net = require('net'); | |
var url = require('url'); | |
// edit this | |
var conString = 'tcp://crypton_test_user:crypton_test_user_password@localhost:5432/crypton_test'; // default | |
var config = parse(conString); | |
console.log(config); |
var G = 100; | |
var vertex; | |
for (var i = 0; i < plane.geometry.vertices.length; i++) { | |
vertex = plane.geometry.vertices[i]; | |
var distance = Math.sqrt(Math.pow(vertex.x - sphere.position.x, 2) + Math.pow(vertex.y - -sphere.position.z, 2)); | |
var f = -(G * sphere.mass) / Math.pow(distance, 2); | |
vertex.z = f; | |
} |