diff --git a/js/keyboard_input_manager.js b/js/keyboard_input_manager.js index 4f2e856..32a177a 100644 --- a/js/keyboard_input_manager.js +++ b/js/keyboard_input_manager.js @@ -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