use bit shifts
This commit is contained in:
parent
b9b7937a96
commit
125356d321
1 changed files with 2 additions and 2 deletions
|
|
@ -12,8 +12,8 @@ export enum Piece {
|
||||||
PAWN = 6,
|
PAWN = 6,
|
||||||
|
|
||||||
// bit 3: color (0-1)
|
// bit 3: color (0-1)
|
||||||
WHITE = 0,
|
WHITE = 0<<3,
|
||||||
BLACK = 8,
|
BLACK = 1<<3,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const CHAR_TO_PIECE: Record<string, number> = {
|
export const CHAR_TO_PIECE: Record<string, number> = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue