mirror of
https://github.com/paricafe/misskey.git
synced 2024-12-01 02:56:43 -06:00
Fix bug
This commit is contained in:
parent
b717e575ea
commit
e77b017edf
1 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ export default class Othello {
|
||||||
|
|
||||||
// 右上
|
// 右上
|
||||||
iterate = createIterater();
|
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)) {
|
if (iterate(targetx + i, targety - i)) {
|
||||||
res.push([1, c]);
|
res.push([1, c]);
|
||||||
break;
|
break;
|
||||||
|
@ -198,7 +198,7 @@ export default class Othello {
|
||||||
|
|
||||||
// 左上
|
// 左上
|
||||||
iterate = createIterater();
|
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)) {
|
if (iterate(targetx - i, targety - i)) {
|
||||||
res.push([7, c]);
|
res.push([7, c]);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue