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:
parent
a6531b08bd
commit
4ad15d4cbd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user