Skip to content

Commit

Permalink
Update win/lose/draw audio files and play
Browse files Browse the repository at this point in the history
Thanks Matt Littlewood

Change-Id: I6b1952039da3a2f1bdeb553a158f185f7edd8c55
  • Loading branch information
calcitem committed Dec 30, 2023
1 parent 0c75b0d commit 8744df9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Binary file modified src/ui/flutter_app/assets/audios/draw.mp3
Binary file not shown.
Binary file modified src/ui/flutter_app/assets/audios/lose.mp3
Binary file not shown.
Binary file modified src/ui/flutter_app/assets/audios/win.mp3
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ class GameResultAlertDialog extends StatelessWidget {
// TODO: Why sometimes _gameResult is null?
position.result = _gameResult;

switch (position.result) {

Check warning on line 44 in src/ui/flutter_app/lib/game_page/widgets/dialogs/game_result_alert_dialog.dart

View workflow job for this annotation

GitHub Actions / Lint flutter code

Missing case clause for 'null'.. See https://dart.dev/tools/diagnostic-messages#missing_enum_constant_in_switch
case GameResult.win:
SoundManager().playTone(Sound.win);
break;
case GameResult.draw:
SoundManager().playTone(Sound.draw);
break;
case GameResult.lose:
SoundManager().playTone(Sound.lose);
break;
}

final String dialogTitle = _gameResult!.winString(context);

final bool isTopLevel =
Expand Down

0 comments on commit 8744df9

Please sign in to comment.