Merge pull request #2572 from syuilo/refactor-reversi-game

Refactor reversi game
This commit is contained in:
syuilo 2018-09-01 22:20:32 +09:00 committed by GitHub
commit 0962e62b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,11 +159,9 @@ export default Vue.extend({
canPutEverywhere: this.game.settings.canPutEverywhere,
loopedBoard: this.game.settings.loopedBoard
});
this.logs.forEach((log, i) => {
if (i < v) {
this.o.put(log.color, log.pos);
}
});
for (const log of this.logs.slice(0, v)) {
this.o.put(log.color, log.pos);
}
this.$forceUpdate();
}
},