Add Forced move classification (#19)
This commit is contained in:
BIN
public/icons/forced.png
Normal file
BIN
public/icons/forced.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -29,6 +29,15 @@ export const getMovesClassification = (
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const prevPosition = rawPositions[index - 1];
|
||||||
|
if (prevPosition.bestMove && prevPosition.lines.length <= 1) {
|
||||||
|
return {
|
||||||
|
...rawPosition,
|
||||||
|
opening: currentOpening,
|
||||||
|
moveClassification: MoveClassification.Forced,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const playedMove = uciMoves[index - 1];
|
const playedMove = uciMoves[index - 1];
|
||||||
const bestMove = rawPositions[index - 1].bestMove;
|
const bestMove = rawPositions[index - 1].bestMove;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export enum MoveClassification {
|
|||||||
Good = "good",
|
Good = "good",
|
||||||
Excellent = "excellent",
|
Excellent = "excellent",
|
||||||
Best = "best",
|
Best = "best",
|
||||||
|
Forced = "forced",
|
||||||
Book = "book",
|
Book = "book",
|
||||||
Great = "great",
|
Great = "great",
|
||||||
Brilliant = "brilliant",
|
Brilliant = "brilliant",
|
||||||
|
|||||||
Reference in New Issue
Block a user