diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-10 22:23:14 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-10 22:23:14 +0900 |
| commit | 1dc8ad6d0c6522e92d982b81d28b106fe3baa13c (patch) | |
| tree | 2728cf92df66e0fe8457ca021e1e15df5030d3f7 /src/common | |
| parent | v4092 (diff) | |
| download | misskey-1dc8ad6d0c6522e92d982b81d28b106fe3baa13c.tar.gz misskey-1dc8ad6d0c6522e92d982b81d28b106fe3baa13c.tar.bz2 misskey-1dc8ad6d0c6522e92d982b81d28b106fe3baa13c.zip | |
:v:
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/othello/core.ts | 9 | ||||
| -rw-r--r-- | src/common/othello/maps.ts | 12 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/common/othello/core.ts b/src/common/othello/core.ts index 3a181a3eb9..bd04ab7683 100644 --- a/src/common/othello/core.ts +++ b/src/common/othello/core.ts @@ -235,7 +235,14 @@ export default class Othello { //} // 一周して自分に帰ってきたら - if (this.transformXyToPos(x, y) == initPos) break; + if (this.transformXyToPos(x, y) == initPos) { + // ↓のコメントアウトを外すと、「現時点で自分の石が隣接していないが、 + // そこに置いたとするとループして最終的に挟んだことになる」というケースを有効化します。(Test4のマップで違いが分かります) + // このケースを有効にした方が良いのか無効にした方が良いのか判断がつかなかったためとりあえず無効としておきます + // (あと無効な方がゲームとしておもしろそうだった) + //stones = stones.concat(found); + break; + } } else { if (x == -1 || y == -1 || x == this.mapWidth || y == this.mapHeight) break; } diff --git a/src/common/othello/maps.ts b/src/common/othello/maps.ts index 81b9663c38..1382cac03f 100644 --- a/src/common/othello/maps.ts +++ b/src/common/othello/maps.ts @@ -834,3 +834,15 @@ export const test3: Map = { 'b--', ] }; + +export const test4: Map = { + name: 'Test4', + category: 'Test', + data: [ + '-w--b-', + '-w--b-', + '------', + '-w--b-', + '-w--b-' + ] +}; |