Merge branch 'main' into chore/group-plunger

pull/43/head
Allison Ryan 4 years ago committed by GitHub
commit 735a225dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,6 +15,7 @@ class GameBloc extends Bloc<GameEvent, GameState> {
} }
static const bonusWord = 'GOOGLE'; static const bonusWord = 'GOOGLE';
static const bonusWordScore = 10000;
void _onBallLost(BallLost event, Emitter emit) { void _onBallLost(BallLost event, Emitter emit) {
if (state.balls > 0) { if (state.balls > 0) {
@ -44,6 +45,7 @@ class GameBloc extends Bloc<GameEvent, GameState> {
], ],
), ),
); );
add(const Scored(points: bonusWordScore));
} else { } else {
emit( emit(
state.copyWith(activatedBonusLetters: newBonusLetters), state.copyWith(activatedBonusLetters: newBonusLetters),

@ -177,6 +177,12 @@ void main() {
activatedBonusLetters: [], activatedBonusLetters: [],
bonusHistory: [GameBonus.word], bonusHistory: [GameBonus.word],
), ),
GameState(
score: GameBloc.bonusWordScore,
balls: 3,
activatedBonusLetters: [],
bonusHistory: [GameBonus.word],
),
], ],
); );
}); });

Loading…
Cancel
Save