diff --git a/lib/game/bloc/game_bloc.dart b/lib/game/bloc/game_bloc.dart index 74685215..c5e45e28 100644 --- a/lib/game/bloc/game_bloc.dart +++ b/lib/game/bloc/game_bloc.dart @@ -15,6 +15,7 @@ class GameBloc extends Bloc { } static const bonusWord = 'GOOGLE'; + static const bonusWordScore = 10000; void _onBallLost(BallLost event, Emitter emit) { if (state.balls > 0) { @@ -37,6 +38,7 @@ class GameBloc extends Bloc { if (newBonusLetters.length == bonusWord.length) { emit( state.copyWith( + score: state.score + bonusWordScore, activatedBonusLetters: [], bonusHistory: [ ...state.bonusHistory, diff --git a/test/game/bloc/game_bloc_test.dart b/test/game/bloc/game_bloc_test.dart index ad1d6c55..6e18acc4 100644 --- a/test/game/bloc/game_bloc_test.dart +++ b/test/game/bloc/game_bloc_test.dart @@ -172,7 +172,7 @@ void main() { bonusHistory: [], ), GameState( - score: 0, + score: GameBloc.bonusWordScore, balls: 3, activatedBonusLetters: [], bonusHistory: [GameBonus.word],