tweak piece enum

This commit is contained in:
Satria 2026-07-26 09:19:41 +07:00
commit e20f297fc6

View file

@ -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,