From c8bf30d0d8d8d88ab738f6377ad9b65c961b5d4f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Mar 2018 18:22:54 +0900 Subject: どこでも置けるモード実装 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/models/othello-game.ts | 1 + src/api/stream/othello-game.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/api') diff --git a/src/api/models/othello-game.ts b/src/api/models/othello-game.ts index 82c0042108..b9d33007bf 100644 --- a/src/api/models/othello-game.ts +++ b/src/api/models/othello-game.ts @@ -30,6 +30,7 @@ export interface IGame { map: string[]; bw: string | number; is_llotheo: boolean; + can_put_everywhere: boolean; }; } diff --git a/src/api/stream/othello-game.ts b/src/api/stream/othello-game.ts index cc936805ba..05f244f769 100644 --- a/src/api/stream/othello-game.ts +++ b/src/api/stream/othello-game.ts @@ -125,7 +125,8 @@ export default function(request: websocket.request, connection: websocket.connec //#region 盤面に最初から石がないなどして始まった瞬間に勝敗が決定する場合があるのでその処理 const o = new Othello(map, { - isLlotheo: freshGame.settings.is_llotheo + isLlotheo: freshGame.settings.is_llotheo, + canPutEverywhere: freshGame.settings.can_put_everywhere }); if (o.isEnded) { @@ -166,7 +167,8 @@ export default function(request: websocket.request, connection: websocket.connec if (!game.user1_id.equals(user._id) && !game.user2_id.equals(user._id)) return; const o = new Othello(game.settings.map, { - isLlotheo: game.settings.is_llotheo + isLlotheo: game.settings.is_llotheo, + canPutEverywhere: game.settings.can_put_everywhere }); game.logs.forEach(log => { -- cgit v1.2.3-freya