mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 00:18:56 +02:00
refactoring
This commit is contained in:
parent
2bee3d357a
commit
eba8734667
6 changed files with 72 additions and 59 deletions
|
@ -18,6 +18,12 @@ var ConfirmCancelTerminal = require('../views').ConfirmCancelTerminal;
|
|||
var NextLevelConfirm = require('../views').NextLevelConfirm;
|
||||
var LevelToolbar = require('../views').LevelToolbar;
|
||||
|
||||
var regexMap = {
|
||||
'show goal': /^show goal$/,
|
||||
'hide goal': /^hide goal$/,
|
||||
'show solution': /^show solution$/
|
||||
};
|
||||
|
||||
var LevelBuilder = Level.extend({
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
|
@ -71,6 +77,19 @@ var LevelBuilder = Level.extend({
|
|||
);
|
||||
},
|
||||
|
||||
initParseWaterfall: function() {
|
||||
LevelBuilder.__super__.initParseWaterfall.apply(this, [options]);
|
||||
|
||||
this.parseWaterfall.addFirst(
|
||||
'parseWaterfall',
|
||||
parse
|
||||
);
|
||||
this.parseWaterfall.addFirst(
|
||||
'instantWaterfall',
|
||||
this.getInstantCommands()
|
||||
);
|
||||
},
|
||||
|
||||
takeControl: function() {
|
||||
Main.getEventBaton().stealBaton('processLevelBuilderCommand', this.processLevelCommand, this);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue