Skip to content

Commit

Permalink
opening-book: Delay 100ms to fix icon is not book
Browse files Browse the repository at this point in the history
  • Loading branch information
calcitem committed Nov 17, 2024
1 parent e9a2efb commit 47d4cdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/flutter_app/lib/game_page/services/engine/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class Engine {

// Check if the first character of selectedMove is 'x'
if (selectedMove.startsWith('x')) {
await Future<void>.delayed(const Duration(milliseconds: 100));
// Extract the part after 'x', query wmdNotationToMove, and prepend '-'
final String move = wmdNotationToMove[selectedMove.substring(1)]!;
return EngineRet(
Expand All @@ -190,6 +191,7 @@ class Engine {
ExtMove('-$move'),
);
} else {
await Future<void>.delayed(const Duration(milliseconds: 100));
// Default logic for selectedMove
return EngineRet(
"0", // Default score
Expand Down

0 comments on commit 47d4cdc

Please sign in to comment.