* wip

* wip

* wip

* wip

* Update game.setting.vue

* wip

* wip

* Update game.setting.vue

* wip

* Update game.board.vue

* wip

* Update sidebar.ts
This commit is contained in:
syuilo 2020-10-27 18:11:41 +09:00 committed by GitHub
parent 6f34c74027
commit 6258ce75b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1286 additions and 66 deletions

View file

@ -243,20 +243,23 @@ export default class extends Channel {
if (game.isEnded) return;
if ((game.user1Id !== this.user.id) && (game.user2Id !== this.user.id)) return;
const myColor =
((game.user1Id === this.user.id) && game.black == 1) || ((game.user2Id === this.user.id) && game.black == 2)
? true
: false;
const o = new Reversi(game.map, {
isLlotheo: game.isLlotheo,
canPutEverywhere: game.canPutEverywhere,
loopedBoard: game.loopedBoard
});
// 盤面の状態を再生
for (const log of game.logs) {
o.put(log.color, log.pos);
}
const myColor =
((game.user1Id === this.user.id) && game.black == 1) || ((game.user2Id === this.user.id) && game.black == 2)
? true
: false;
if (o.turn !== myColor) return;
if (!o.canPut(myColor, pos)) return;
o.put(myColor, pos);