mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
awesome level delegation going
This commit is contained in:
parent
eb33897a22
commit
4b3e13b0b5
5 changed files with 54 additions and 27 deletions
|
@ -115,12 +115,21 @@ var Sandbox = Backbone.View.extend({
|
|||
}, this);
|
||||
},
|
||||
|
||||
exitLevel: function(command, deferred) {
|
||||
command.addWarning(
|
||||
"You aren't in a level! You are in a sandbox, start a level with `start level [id]`"
|
||||
);
|
||||
deferred.resolve();
|
||||
},
|
||||
|
||||
processSandboxCommand: function(command, deferred) {
|
||||
var commandMap = {
|
||||
help: this.helpDialog,
|
||||
reset: this.reset,
|
||||
delay: this.delay,
|
||||
clear: this.clear
|
||||
'help': this.helpDialog,
|
||||
'reset': this.reset,
|
||||
'delay': this.delay,
|
||||
'clear': this.clear,
|
||||
'exit level': this.exitLevel,
|
||||
'start level': this.startLevel
|
||||
};
|
||||
var method = commandMap[command.get('method')];
|
||||
if (!method) { throw new Error('no method for that wut'); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue