summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-09 20:12:06 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-09 20:12:06 +0900
commite77b017edf487f3d88cda4f127c41579b65cb479 (patch)
tree0b96317d02e676fd998eba1e5335f567f88fd25c /src
parentRefactor: Remove the magick numbers (diff)
downloadsharkey-e77b017edf487f3d88cda4f127c41579b65cb479.tar.gz
sharkey-e77b017edf487f3d88cda4f127c41579b65cb479.tar.bz2
sharkey-e77b017edf487f3d88cda4f127c41579b65cb479.zip
Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/common/othello.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/othello.ts b/src/common/othello.ts
index aa53dee465..858fc33158 100644
--- a/src/common/othello.ts
+++ b/src/common/othello.ts
@@ -144,7 +144,7 @@ export default class Othello {
// 右上
iterate = createIterater();
- for (let c = 0, i = 1; i < Math.min(BOARD_SIZE - targetx, targety); c++, i++) {
+ for (let c = 0, i = 1; i <= Math.min(BOARD_SIZE - targetx, targety); c++, i++) {
if (iterate(targetx + i, targety - i)) {
res.push([1, c]);
break;
@@ -198,7 +198,7 @@ export default class Othello {
// 左上
iterate = createIterater();
- for (let c = 0, i = 1; i < Math.min(targetx, targety); c++, i++) {
+ for (let c = 0, i = 1; i <= Math.min(targetx, targety); c++, i++) {
if (iterate(targetx - i, targety - i)) {
res.push([7, c]);
break;