Zamiast tego spagetti
var lastAction = this.actions[this.currentPlayer][self.actions[self.currentPlayer].length-1];
this.actions[this.currentPlayer].splice((this.actions[this.currentPlayer].length-1), 1);
Proponuję użyć pop
Czemu winOptions są stringami?
this.winOptions = [
["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"],
["1", "4", "7"], ["2", "5", "8"], ["3", "6", "9"],
["1", "5", "9"], ["3", "5", "7"]
];
Po co w devDependencies
"devDependencies": {
"babel-core": "^6.24.1",
"babel-loader": "^7.0.0",
"babel-preset-es2015": "^6.24.1",
"coffeelint": "^1.16.0",
"cssnano": "^3.10.0",
"gulp": "^3.9.1",
"gulp-cssnano": "^2.1.2",
"gulp-livereload": "^3.8.1",
"gulp-plumber": "^1.1.0",
"gulp-sass": "^3.1.0",
"gulp-webpack": "^1.5.0",
"sass": "^1.0.0-beta.2",
"webpack-watch-livereload-plugin": "0.0.1"
},
- babel-core,
- babel-loader,
- babel-preset-es2015,
- coffelint,
- cssnano,
- sass,
- webpack-watch-livereload-plugin
?