1
0
mirror of https://github.com/danog/2048.git synced 2024-11-30 04:19:06 +01:00

add R key to restart game

This commit is contained in:
Gabriele Cirulli 2014-03-22 16:35:47 +01:00
parent a6531b08bd
commit 4ad15d4cbd

View File

@ -61,6 +61,11 @@ KeyboardInputManager.prototype.listen = function () {
self.emit("move", mapped);
}
}
// R key restarts the game
if (!modifiers && event.which === 82) {
self.restart.call(self, event);
}
});
// Respond to button presses