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 bestMove = rawPositions[index - 1].bestMove;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ export enum MoveClassification {
|
||||
Good = "good",
|
||||
Excellent = "excellent",
|
||||
Best = "best",
|
||||
Forced = "forced",
|
||||
Book = "book",
|
||||
Great = "great",
|
||||
Brilliant = "brilliant",
|
||||
|
||||
Reference in New Issue
Block a user