parent
b2b1d36255
commit
6fe6aebe87
15 changed files with 140 additions and 86 deletions
@ -1,17 +1,23 @@ |
||||
var State = require('./State'); |
||||
var actions = Object.create(null); |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
module.exports = { |
||||
level: 0, |
||||
|
||||
subscribe(event, callback) { |
||||
if (actions[event] === undefined) { |
||||
actions[event] = []; |
||||
} |
||||
|
||||
/*state: { |
||||
newGame: function() { |
||||
|
||||
}, |
||||
actions[event].push(callback); |
||||
}, |
||||
|
||||
nextLevel: function() { |
||||
module.exports.level++; |
||||
} |
||||
}*/ |
||||
publish(event) { |
||||
actions[event].forEach(function(callback) { |
||||
callback(); |
||||
}); |
||||
} |
||||
}; |
||||
|
@ -1,11 +0,0 @@ |
||||
var React = require('react'); |
||||
|
||||
var Cell = React.createClass({ |
||||
render: function() { |
||||
var classname = ['cell', 'x' + this.props.x, 'y' + this.props.y]; |
||||
|
||||
return (<div className={classname.join(' ')}>{this.props.value}</div>); |
||||
} |
||||
}); |
||||
|
||||
module.exports = Cell; |
@ -0,0 +1,9 @@ |
||||
require('../../sass/board/titlebar.scss'); |
||||
|
||||
var React = require('react'); |
||||
|
||||
module.exports = React.createClass({ |
||||
render() { |
||||
return (<div className='titlebar'>Multiples of 2</div>); |
||||
} |
||||
}); |
@ -0,0 +1,6 @@ |
||||
.titlebar { |
||||
font-size:13px; |
||||
height:40px; |
||||
line-height:40px; |
||||
text-align:center; |
||||
} |
Loading…
Reference in new issue