From e20f297fc6216a92f1df576e3527863c4205d609 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 26 Jul 2026 09:19:41 +0700 Subject: [PATCH] tweak piece enum --- src/lib/chess/types.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/chess/types.ts b/src/lib/chess/types.ts index 679d494..5acc114 100644 --- a/src/lib/chess/types.ts +++ b/src/lib/chess/types.ts @@ -4,12 +4,12 @@ export type GameListener = (board: Game) => void; export enum Piece { // bit 0-2: piece type (0-6) EMPTY = 0, - KING = 1, - QUEEN = 2, - ROOK = 3, - BISHOP = 4, - KNIGHT = 5, - PAWN = 6, + QUEEN = 1, + ROOK = 2, + BISHOP = 3, + KNIGHT = 4, + PAWN = 5, + KING = 6, // bit 3: color (0-1) WHITE = 0<<3,