diff --git a/common/src/algorithms/movementDirection.ts b/common/src/algorithms/movementDirection.ts index 2164ca4..873b183 100644 --- a/common/src/algorithms/movementDirection.ts +++ b/common/src/algorithms/movementDirection.ts @@ -1,14 +1,15 @@ /** + * @internal * A helper method for counting how many ships are on each side of a specific * ship on the board. * * @param board The array of spaces that represents the Gravwell board * @param shipLocation The index of the ship that we are counting the number of - * ships on each side for. + * ships on each side for. * @returns An object containing the number of ships that are on each side of - * the target ship + * the target ship */ -function countShips(board: any[], shipLocation: number) { +export function countShips(board: any[], shipLocation: number) { return { left: board.slice(1, shipLocation - 1).filter(x => x != null).length, right: board.slice(shipLocation + 1).filter(x => x != null).length,