Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/src/model/common/eval.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ ISet<Shape> computeBestMoveShapes(
IList<MoveWithWinningChances> moves,
Side sideToMove,
PieceAssets pieceAssets,
Color boardPrefsColor,
) {
// Scale down all moves with index > 0 based on how much worse their winning chances are compared to the best move
// (assume moves are ordered by their winning chances, so index==0 is the best move)
Expand Down Expand Up @@ -219,7 +220,7 @@ ISet<Shape> computeBestMoveShapes(
final move = m.move;
// Same colors as in the Web UI with a slightly different opacity
// The best move has a different color than the other moves
final color = Color((i == 0) ? 0x66003088 : 0x664A4A4A);
final color = (i == 0) ? boardPrefsColor : const Color(0x664A4A4A);
switch (move) {
case NormalMove(from: _, to: _, promotion: final promRole):
return [
Expand Down
1 change: 1 addition & 0 deletions lib/src/view/analysis/analysis_board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class AnalysisBoardState extends ConsumerState<AnalysisBoard> {
bestMoves,
currentNode.position.turn,
boardPrefs.pieceSet.assets,
boardPrefs.shapeColor.color,
)
: ISet();

Expand Down
1 change: 1 addition & 0 deletions lib/src/view/broadcast/broadcast_game_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ class _BroadcastBoardState extends ConsumerState<_BroadcastBoard> {
bestMoves,
currentNode.position.turn,
boardPrefs.pieceSet.assets,
boardPrefs.shapeColor.color,
)
: ISet();

Expand Down
2 changes: 1 addition & 1 deletion lib/src/view/puzzle/puzzle_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class _Body extends ConsumerWidget {
puzzleState.isEngineEnabled && evalBestMove != null
? ISet([
Arrow(
color: const Color(0x66003088),
color: boardPreferences.shapeColor.color,
orig: evalBestMove.from,
dest: evalBestMove.to,
),
Expand Down
1 change: 1 addition & 0 deletions lib/src/view/study/study_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ class _StudyBoardState extends ConsumerState<_StudyBoard> {
bestMoves,
currentNode.position!.turn,
boardPrefs.pieceSet.assets,
boardPrefs.shapeColor.color,
)
: ISet();

Expand Down