diff --git a/.vscode/launch.json b/.vscode/launch.json index 79e3d4b..158e0ca 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "type": "node", "request": "launch", "name": "Debug ChessBot Server", - "runtimeExecutable": "nodemon", + "runtimeExecutable": "ts-node", "program": "${workspaceFolder}/src/server/main.ts", "restart": true, "console": "integratedTerminal", diff --git a/package.json b/package.json index 2d85cdf..8849eb9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "version": "0.0.0", "workspaces": ["src/client", "src/server"], "scripts": { - "dev": "nodemon src/server/main.ts", + "dev": "ts-node src/server/main.ts", + "devup": "nodemon src/server/main.ts", "debug": "nodemon --inspect src/server/main.ts", "start": "NODE_ENV=production ts-node ./src/server/main.ts", "build": "vite build", diff --git a/src/server/robot/path-materializer.ts b/src/server/robot/path-materializer.ts index 55f1f60..712ef83 100644 --- a/src/server/robot/path-materializer.ts +++ b/src/server/robot/path-materializer.ts @@ -348,7 +348,6 @@ function moveMainPiece(move: GridMove): MovePiece { /** * Te easiest move to get to the dead zone */ -//TODO: Change the move to Grid that way we can move off the board. function moveToDeadZone(origin: GridIndices): GridMove { const aboveMove = { from: origin, @@ -417,7 +416,7 @@ function findGridIndicesInArray( array: GridIndices[], obj: GridIndices, ): number { - return array.findIndex((o) => o.i == obj.i && o.j == obj.j); + return array.findIndex((o) => o.i === obj.i && o.j === obj.j); } function returnToHome(from: GridIndices, id: string): SequentialCommandGroup {