- const [sizeX,sizeY] = [V.size.x,V.size.y];
- const shiftX = (color == "w" ? -1 : 1);
- const firstRank = (color == 'w' ? sizeX-1 : 0);
- const startRank = (color == "w" ? sizeX-2 : 1);
- const lastRank = (color == "w" ? 0 : sizeX-1);
- const finalPieces = x + shiftX == lastRank
- ? [V.ROOK,V.KNIGHT,V.BISHOP,V.QUEEN]
- : [V.PAWN];
+ const [sizeX, sizeY] = [V.size.x, V.size.y];
+ const shiftX = color == "w" ? -1 : 1;
+ const startRank = color == "w" ? sizeX - 2 : 1;
+ const lastRank = color == "w" ? 0 : sizeX - 1;
+ const finalPieces =
+ x + shiftX == lastRank ? [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN] : [V.PAWN];