From 1e17c609ed1e4eda8e1a7111312091bf7a970960 Mon Sep 17 00:00:00 2001 From: Nathan Mande Date: Tue, 13 Aug 2024 23:10:56 +0200 Subject: [PATCH] refactor: use correct keys mapping --- apps/web/src/core/pieces/pieces.controller.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/core/pieces/pieces.controller.ts b/apps/web/src/core/pieces/pieces.controller.ts index 4cd94f1..fcd3d1b 100644 --- a/apps/web/src/core/pieces/pieces.controller.ts +++ b/apps/web/src/core/pieces/pieces.controller.ts @@ -6,8 +6,8 @@ import { ColorVariant, PieceId, PieceModel, - PiecesGroupModel, - PieceType + PiecesGroup, + PiecesGroupModel } from "../../common"; import { ChessBoardComponent } from "../chess-board/chess-board.component"; import { PiecesComponent } from "./pieces.component"; @@ -25,7 +25,7 @@ export class PiecesController { public movePiece( color: ColorVariant, - type: `${keyof typeof PieceType}s`, + type: keyof PiecesGroup, id: PieceId, coords: BoardCoords ) { @@ -41,7 +41,7 @@ export class PiecesController { public dropPiece( color: ColorVariant, - type: `${keyof typeof PieceType}s`, + type: keyof PiecesGroup, id: PieceId ) { const groups = this.component.groups;