どこでも置けるモード実装

This commit is contained in:
syuilo
2018-03-10 18:22:54 +09:00
parent 8b0162a458
commit c8bf30d0d8
5 changed files with 27 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ export interface IGame {
map: string[];
bw: string | number;
is_llotheo: boolean;
can_put_everywhere: boolean;
};
}

View File

@@ -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 => {