module.exports = Clock.extend({
width: 10,
height: 22,
initialDelay: 300,
attributes: {
controler: null,
current: null,
delay: 300,
dropLock: false,
hold: null,
matrix: null,
queue: null,
root: null,
scoreKeeper: null,
view: null
},
initialize: function () {
Clock.prototype.initialize.call(this);
var queue = new TetriminoFactory({ bounds: this._bounds.bind(this) });
var view = new TetrisView({ game: this });
var controler = new TetrisControl({ game: this });
var scoreKeeper = new ScoreKeeper({ game: this });
this.set({
'controler': controler,
'delay': this.initialDelay,
'matrix': this._getEmptyMatrix(),
'queue': queue,
'scoreKeeper': scoreKeeper,
'view': view
});