test: fixed tests with new game over logic

pull/213/head
RuiAlonso 3 years ago
parent 3e2e5fbae0
commit aeee5ec516

@ -85,14 +85,14 @@ void main() {
score: 2, score: 2,
multiplier: 1, multiplier: 1,
balls: 1, balls: 1,
rounds: 1, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
const GameState( const GameState(
score: 5, score: 5,
multiplier: 1, multiplier: 1,
balls: 1, balls: 1,
rounds: 1, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
], ],
@ -146,14 +146,14 @@ void main() {
const GameState( const GameState(
score: 0, score: 0,
multiplier: 2, multiplier: 2,
balls: 3, balls: 1,
rounds: 3, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
const GameState( const GameState(
score: 0, score: 0,
multiplier: 3, multiplier: 3,
balls: 3, balls: 1,
rounds: 3, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
@ -167,7 +167,7 @@ void main() {
seed: () => const GameState( seed: () => const GameState(
score: 0, score: 0,
multiplier: 5, multiplier: 5,
balls: 3, balls: 1,
rounds: 3, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
@ -178,7 +178,7 @@ void main() {
const GameState( const GameState(
score: 0, score: 0,
multiplier: 6, multiplier: 6,
balls: 3, balls: 1,
rounds: 3, rounds: 3,
bonusHistory: [], bonusHistory: [],
), ),
@ -199,7 +199,7 @@ void main() {
const GameState( const GameState(
score: 0, score: 0,
multiplier: 1, multiplier: 1,
balls: 2, balls: 1,
rounds: 2, rounds: 2,
bonusHistory: [], bonusHistory: [],
), ),
@ -213,7 +213,7 @@ void main() {
const GameState( const GameState(
score: 0, score: 0,
multiplier: 1, multiplier: 1,
balls: 0, balls: 1,
rounds: 0, rounds: 0,
bonusHistory: [], bonusHistory: [],
), ),
@ -259,8 +259,8 @@ void main() {
GameState( GameState(
score: 0, score: 0,
multiplier: 1, multiplier: 1,
balls: 3, balls: 1,
rounds: 2, rounds: 3,
bonusHistory: [GameBonus.sparkyTurboCharge], bonusHistory: [GameBonus.sparkyTurboCharge],
), ),
], ],

@ -25,7 +25,7 @@ void main() {
score: 0, score: 0,
multiplier: 1, multiplier: 1,
balls: 0, balls: 0,
rounds: 3, rounds: 0,
bonusHistory: [], bonusHistory: [],
); );
whenListen(bloc, Stream.value(state), initialState: state); whenListen(bloc, Stream.value(state), initialState: state);

@ -22,7 +22,7 @@ void main() {
score: 0, score: 0,
multiplier: 1, multiplier: 1,
balls: 0, balls: 0,
rounds: 3, rounds: 0,
bonusHistory: [], bonusHistory: [],
); );
whenListen(bloc, Stream.value(state), initialState: state); whenListen(bloc, Stream.value(state), initialState: state);

@ -144,9 +144,9 @@ void main() {
}, },
); );
flameTester.test( flameBlocTester.testGameWidget(
'when ball is debug', 'when ball is debug',
(game) async { setUp: (game, tester) async {
final ball = ControlledBall.debug(); final ball = ControlledBall.debug();
final wall = BottomWall(); final wall = BottomWall();
await game.ensureAddAll([ball, wall]); await game.ensureAddAll([ball, wall]);

Loading…
Cancel
Save