Skip to content

Commit 2a9fbd0

Browse files
committed
fix broken setting
1 parent 06597ad commit 2a9fbd0

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/Algs.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import { Random } from "./Random";
22

3+
export function getMoves(
4+
piece: string,
5+
data: Array<string | number>,
6+
size: number,
7+
x: number,
8+
y: number
9+
) {
10+
return parseNotation(pieceMovesCheck[piece], data, size, x, y);
11+
}
12+
313
function isValid(
414
data: Array<string | number>,
515
size: number,
@@ -78,7 +88,7 @@ function parseDirection(letter: string): number[] {
7888
return [];
7989
}
8090

81-
export function parseNotation(
91+
function parseNotation(
8292
notation: string,
8393
data: Array<string | number>,
8494
size: number,

src/Game.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Game as BgioGame } from "boardgame.io";
22
import { INVALID_MOVE } from "boardgame.io/core";
3-
import { fillPositions, generateBoard, parseNotation } from "./Algs";
3+
import { fillPositions, generateBoard, getMoves } from "./Algs";
44
import { Random } from "./Random";
55

66
export interface Cell {
@@ -83,7 +83,7 @@ function calcAttackedCells(G: GameState) {
8383
return cell.value;
8484
});
8585

86-
const moves = parseNotation(
86+
const moves = getMoves(
8787
cell.known,
8888
data,
8989
G.size,

0 commit comments

Comments
 (0)