Skip to content
Snippets Groups Projects
Commit 1dc8ad6d authored by syuilo's avatar syuilo
Browse files

✌️

parent 1cff4625
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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-'
]
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment