1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-02 16:58:43 +09:00

Refactor reversi game

This commit is contained in:
Aya Morisawa 2018-09-01 22:18:07 +09:00
parent 4a977cd523
commit 91ebd310b7
No known key found for this signature in database
GPG Key ID: 3E64865D70D579F2

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();
}
},