Refactor reversi game

This commit is contained in:
Aya Morisawa 2018-09-01 22:18:07 +09:00
parent d935a39919
commit 4981b3f7ae

View file

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