diff --git a/lib/game/bloc/game_bloc.dart b/lib/game/bloc/game_bloc.dart index ba604f17..4ba63092 100644 --- a/lib/game/bloc/game_bloc.dart +++ b/lib/game/bloc/game_bloc.dart @@ -12,7 +12,6 @@ class GameBloc extends Bloc { on(_onBallLost); on(_onScored); on(_onBonusActivated); - on(_onDashNestActivated); on(_onSparkyTurboChargeActivated); } @@ -34,31 +33,6 @@ class GameBloc extends Bloc { ); } - void _onDashNestActivated(DashNestActivated event, Emitter emit) { - final newNests = { - ...state.activatedDashNests, - event.nestId, - }; - - final achievedBonus = newNests.length == 3; - if (achievedBonus) { - emit( - state.copyWith( - balls: state.balls + 1, - activatedDashNests: {}, - bonusHistory: [ - ...state.bonusHistory, - GameBonus.dashNest, - ], - ), - ); - } else { - emit( - state.copyWith(activatedDashNests: newNests), - ); - } - } - Future _onSparkyTurboChargeActivated( SparkyTurboChargeActivated event, Emitter emit, diff --git a/lib/game/bloc/game_event.dart b/lib/game/bloc/game_event.dart index 392cc50f..bbb89028 100644 --- a/lib/game/bloc/game_event.dart +++ b/lib/game/bloc/game_event.dart @@ -42,15 +42,6 @@ class BonusActivated extends GameEvent { List get props => [bonus]; } -class DashNestActivated extends GameEvent { - const DashNestActivated(this.nestId); - - final String nestId; - - @override - List get props => [nestId]; -} - class SparkyTurboChargeActivated extends GameEvent { const SparkyTurboChargeActivated(); diff --git a/lib/game/bloc/game_state.dart b/lib/game/bloc/game_state.dart index aa1144c0..c57eedb4 100644 --- a/lib/game/bloc/game_state.dart +++ b/lib/game/bloc/game_state.dart @@ -23,14 +23,12 @@ class GameState extends Equatable { required this.score, required this.balls, required this.bonusHistory, - required this.activatedDashNests, }) : assert(score >= 0, "Score can't be negative"), assert(balls >= 0, "Number of balls can't be negative"); const GameState.initial() : score = 0, balls = 3, - activatedDashNests = const {}, bonusHistory = const []; /// The current score of the game. @@ -41,9 +39,6 @@ class GameState extends Equatable { /// When the number of balls is 0, the game is over. final int balls; - /// Active dash nests. - final Set activatedDashNests; - /// Holds the history of all the [GameBonus]es earned by the player during a /// PinballGame. final List bonusHistory; @@ -54,7 +49,6 @@ class GameState extends Equatable { GameState copyWith({ int? score, int? balls, - Set? activatedDashNests, List? bonusHistory, }) { assert( @@ -65,7 +59,6 @@ class GameState extends Equatable { return GameState( score: score ?? this.score, balls: balls ?? this.balls, - activatedDashNests: activatedDashNests ?? this.activatedDashNests, bonusHistory: bonusHistory ?? this.bonusHistory, ); } @@ -74,7 +67,6 @@ class GameState extends Equatable { List get props => [ score, balls, - activatedDashNests, bonusHistory, ]; } diff --git a/lib/game/components/flutter_forest.dart b/lib/game/components/flutter_forest.dart index 29cfa887..3c5f5a1f 100644 --- a/lib/game/components/flutter_forest.dart +++ b/lib/game/components/flutter_forest.dart @@ -1,9 +1,7 @@ // ignore_for_file: avoid_renaming_method_parameters import 'package:flame/components.dart'; -import 'package:flame_bloc/flame_bloc.dart'; import 'package:flame_forge2d/flame_forge2d.dart'; -import 'package:flutter/material.dart'; import 'package:pinball/game/game.dart'; import 'package:pinball_components/pinball_components.dart'; import 'package:pinball_flame/pinball_flame.dart'; @@ -15,9 +13,8 @@ import 'package:pinball_flame/pinball_flame.dart'; /// When all [DashNestBumper]s are hit at least once, the [GameBonus.dashNest] /// is awarded, and the [BigDashNestBumper] releases a new [Ball]. /// {@endtemplate} -// TODO(alestiago): Make a [Blueprint] once [Blueprint] inherits from -// [Component]. -class FlutterForest extends Component with Controls<_FlutterForestController> { +class FlutterForest extends Component + with Controls<_FlutterForestController>, HasGameRef { /// {@macro flutter_forest} FlutterForest() { controller = _FlutterForestController(this); @@ -26,17 +23,16 @@ class FlutterForest extends Component with Controls<_FlutterForestController> { @override Future onLoad() async { await super.onLoad(); + gameRef.addContactCallback(_DashNestBumperBallContactCallback()); + final signPost = FlutterSignPost()..initialPosition = Vector2(8.35, -58.3); - final bigNest = _ControlledBigDashNestBumper( - id: 'big_nest_bumper', - )..initialPosition = Vector2(18.55, -59.35); - final smallLeftNest = _ControlledSmallDashNestBumper.a( - id: 'small_nest_bumper_a', - )..initialPosition = Vector2(8.95, -51.95); - final smallRightNest = _ControlledSmallDashNestBumper.b( - id: 'small_nest_bumper_b', - )..initialPosition = Vector2(23.3, -46.75); + final bigNest = _BigDashNestBumper() + ..initialPosition = Vector2(18.55, -59.35); + final smallLeftNest = _SmallDashNestBumper.a() + ..initialPosition = Vector2(8.95, -51.95); + final smallRightNest = _SmallDashNestBumper.b() + ..initialPosition = Vector2(23.3, -46.75); final dashAnimatronic = DashAnimatronic()..position = Vector2(20, -66); await addAll([ @@ -50,31 +46,31 @@ class FlutterForest extends Component with Controls<_FlutterForestController> { } class _FlutterForestController extends ComponentController - with BlocComponent, HasGameRef { + with HasGameRef { _FlutterForestController(FlutterForest flutterForest) : super(flutterForest); - @override - Future onLoad() async { - await super.onLoad(); - gameRef.addContactCallback(_ControlledDashNestBumperBallContactCallback()); - } + final _activatedBumpers = {}; - @override - bool listenWhen(GameState? previousState, GameState newState) { - return (previousState?.bonusHistory.length ?? 0) < - newState.bonusHistory.length && - newState.bonusHistory.last == GameBonus.dashNest; - } + void activateBumper(DashNestBumper dashNestBumper) { + if (!_activatedBumpers.add(dashNestBumper)) return; - @override - void onNewState(GameState state) { - super.onNewState(state); + dashNestBumper.activate(); - component.firstChild()?.playing = true; - _addBonusBall(); + final activatedBonus = _activatedBumpers.length == 3; + if (activatedBonus) { + _addBonusBall(); + + gameRef.read().add(const BonusActivated(GameBonus.dashNest)); + _activatedBumpers + ..forEach((bumper) => bumper.deactivate()) + ..clear(); + + component.firstChild()?.playing = true; + } } Future _addBonusBall() async { + // TODO(alestiago): Remove hardcoded duration. await Future.delayed(const Duration(milliseconds: 700)); await gameRef.add( ControlledBall.bonus(theme: gameRef.theme) @@ -83,83 +79,29 @@ class _FlutterForestController extends ComponentController } } -class _ControlledBigDashNestBumper extends BigDashNestBumper - with Controls, ScorePoints { - _ControlledBigDashNestBumper({required String id}) : super() { - controller = DashNestBumperController(this, id: id); - } - +// TODO(alestiago): Revisit ScorePoints logic once the FlameForge2D +// ContactCallback process is enhanced. +class _BigDashNestBumper extends BigDashNestBumper with ScorePoints { @override int get points => 20; } -class _ControlledSmallDashNestBumper extends SmallDashNestBumper - with Controls, ScorePoints { - _ControlledSmallDashNestBumper.a({required String id}) : super.a() { - controller = DashNestBumperController(this, id: id); - } +class _SmallDashNestBumper extends SmallDashNestBumper with ScorePoints { + _SmallDashNestBumper.a() : super.a(); - _ControlledSmallDashNestBumper.b({required String id}) : super.b() { - controller = DashNestBumperController(this, id: id); - } + _SmallDashNestBumper.b() : super.b(); @override - int get points => 10; + int get points => 20; } -/// {@template dash_nest_bumper_controller} -/// Controls a [DashNestBumper]. -/// {@endtemplate} -@visibleForTesting -class DashNestBumperController extends ComponentController - with BlocComponent, HasGameRef { - /// {@macro dash_nest_bumper_controller} - DashNestBumperController( - DashNestBumper dashNestBumper, { - required this.id, - }) : super(dashNestBumper); - - /// Unique identifier for the controlled [DashNestBumper]. - /// - /// Used to identify [DashNestBumper]s in [GameState.activatedDashNests]. - final String id; - - @override - bool listenWhen(GameState? previousState, GameState newState) { - final wasActive = previousState?.activatedDashNests.contains(id) ?? false; - final isActive = newState.activatedDashNests.contains(id); - - return wasActive != isActive; - } - +class _DashNestBumperBallContactCallback + extends ContactCallback { @override - void onNewState(GameState state) { - super.onNewState(state); - - if (state.activatedDashNests.contains(id)) { - component.activate(); - } else { - component.deactivate(); + void begin(DashNestBumper dashNestBumper, _, __) { + final parent = dashNestBumper.parent; + if (parent is FlutterForest) { + parent.controller.activateBumper(dashNestBumper); } } - - /// Registers when a [DashNestBumper] is hit by a [Ball]. - /// - /// Triggered by [_ControlledDashNestBumperBallContactCallback]. - void hit() { - gameRef.read().add(DashNestActivated(id)); - } -} - -/// Listens when a [Ball] bounces bounces against a [DashNestBumper]. -class _ControlledDashNestBumperBallContactCallback - extends ContactCallback, Ball> { - @override - void begin( - Controls controlledDashNestBumper, - Ball _, - Contact __, - ) { - controlledDashNestBumper.controller.hit(); - } } diff --git a/lib/game/components/score_points.dart b/lib/game/components/score_points.dart index ce13c718..f0d6ec3a 100644 --- a/lib/game/components/score_points.dart +++ b/lib/game/components/score_points.dart @@ -34,10 +34,7 @@ class BallScorePointsCallback extends ContactCallback { ScorePoints scorePoints, Contact __, ) { - _gameRef.read().add( - Scored(points: scorePoints.points), - ); - + _gameRef.read().add(Scored(points: scorePoints.points)); _gameRef.audio.score(); } } diff --git a/test/game/bloc/game_bloc_test.dart b/test/game/bloc/game_bloc_test.dart index e83c35d3..37e14f73 100644 --- a/test/game/bloc/game_bloc_test.dart +++ b/test/game/bloc/game_bloc_test.dart @@ -21,7 +21,6 @@ void main() { const GameState( score: 0, balls: 2, - activatedDashNests: {}, bonusHistory: [], ), ], @@ -40,13 +39,11 @@ void main() { const GameState( score: 2, balls: 3, - activatedDashNests: {}, bonusHistory: [], ), const GameState( score: 5, balls: 3, - activatedDashNests: {}, bonusHistory: [], ), ], @@ -66,56 +63,22 @@ void main() { const GameState( score: 0, balls: 2, - activatedDashNests: {}, bonusHistory: [], ), const GameState( score: 0, balls: 1, - activatedDashNests: {}, bonusHistory: [], ), const GameState( score: 0, balls: 0, - activatedDashNests: {}, bonusHistory: [], ), ], ); }); - group('DashNestActivated', () { - blocTest( - 'adds the bonus when all nests are activated', - build: GameBloc.new, - act: (bloc) => bloc - ..add(const DashNestActivated('0')) - ..add(const DashNestActivated('1')) - ..add(const DashNestActivated('2')), - expect: () => const [ - GameState( - score: 0, - balls: 3, - activatedDashNests: {'0'}, - bonusHistory: [], - ), - GameState( - score: 0, - balls: 3, - activatedDashNests: {'0', '1'}, - bonusHistory: [], - ), - GameState( - score: 0, - balls: 4, - activatedDashNests: {}, - bonusHistory: [GameBonus.dashNest], - ), - ], - ); - }); - group( 'BonusActivated', () { @@ -129,13 +92,11 @@ void main() { GameState( score: 0, balls: 3, - activatedDashNests: {}, bonusHistory: [GameBonus.googleWord], ), GameState( score: 0, balls: 3, - activatedDashNests: {}, bonusHistory: [GameBonus.googleWord, GameBonus.dashNest], ), ], @@ -152,7 +113,6 @@ void main() { GameState( score: 0, balls: 3, - activatedDashNests: {}, bonusHistory: [GameBonus.sparkyTurboCharge], ), ], diff --git a/test/game/bloc/game_event_test.dart b/test/game/bloc/game_event_test.dart index ef2a9f54..d7d587bd 100644 --- a/test/game/bloc/game_event_test.dart +++ b/test/game/bloc/game_event_test.dart @@ -59,23 +59,6 @@ void main() { }); }); - group('DashNestActivated', () { - test('can be instantiated', () { - expect(const DashNestActivated('0'), isNotNull); - }); - - test('supports value equality', () { - expect( - DashNestActivated('0'), - equals(DashNestActivated('0')), - ); - expect( - DashNestActivated('0'), - isNot(equals(DashNestActivated('1'))), - ); - }); - }); - group('SparkyTurboChargeActivated', () { test('can be instantiated', () { expect(const SparkyTurboChargeActivated(), isNotNull); diff --git a/test/game/bloc/game_state_test.dart b/test/game/bloc/game_state_test.dart index 81ca29f1..8170346f 100644 --- a/test/game/bloc/game_state_test.dart +++ b/test/game/bloc/game_state_test.dart @@ -10,14 +10,12 @@ void main() { GameState( score: 0, balls: 0, - activatedDashNests: const {}, bonusHistory: const [], ), equals( const GameState( score: 0, balls: 0, - activatedDashNests: {}, bonusHistory: [], ), ), @@ -30,7 +28,6 @@ void main() { const GameState( score: 0, balls: 0, - activatedDashNests: {}, bonusHistory: [], ), isNotNull, @@ -46,7 +43,6 @@ void main() { () => GameState( balls: -1, score: 0, - activatedDashNests: const {}, bonusHistory: const [], ), throwsAssertionError, @@ -62,7 +58,6 @@ void main() { () => GameState( balls: 0, score: -1, - activatedDashNests: const {}, bonusHistory: const [], ), throwsAssertionError, @@ -77,7 +72,6 @@ void main() { const gameState = GameState( balls: 0, score: 0, - activatedDashNests: {}, bonusHistory: [], ); expect(gameState.isGameOver, isTrue); @@ -89,7 +83,6 @@ void main() { const gameState = GameState( balls: 1, score: 0, - activatedDashNests: {}, bonusHistory: [], ); expect(gameState.isGameOver, isFalse); @@ -104,7 +97,6 @@ void main() { const gameState = GameState( balls: 0, score: 2, - activatedDashNests: {}, bonusHistory: [], ); expect( @@ -121,7 +113,6 @@ void main() { const gameState = GameState( balls: 0, score: 2, - activatedDashNests: {}, bonusHistory: [], ); expect( @@ -138,13 +129,11 @@ void main() { const gameState = GameState( score: 2, balls: 0, - activatedDashNests: {}, bonusHistory: [], ); final otherGameState = GameState( score: gameState.score + 1, balls: gameState.balls + 1, - activatedDashNests: const {'1'}, bonusHistory: const [GameBonus.googleWord], ); expect(gameState, isNot(equals(otherGameState))); @@ -153,7 +142,6 @@ void main() { gameState.copyWith( score: otherGameState.score, balls: otherGameState.balls, - activatedDashNests: otherGameState.activatedDashNests, bonusHistory: otherGameState.bonusHistory, ), equals(otherGameState), diff --git a/test/game/components/controlled_flipper_test.dart b/test/game/components/controlled_flipper_test.dart index 3c0fc1b0..01982129 100644 --- a/test/game/components/controlled_flipper_test.dart +++ b/test/game/components/controlled_flipper_test.dart @@ -21,7 +21,6 @@ void main() { score: 0, balls: 0, bonusHistory: [], - activatedDashNests: {}, ); whenListen(bloc, Stream.value(state), initialState: state); return bloc; diff --git a/test/game/components/controlled_plunger_test.dart b/test/game/components/controlled_plunger_test.dart index a377487e..eee2bcb0 100644 --- a/test/game/components/controlled_plunger_test.dart +++ b/test/game/components/controlled_plunger_test.dart @@ -22,7 +22,6 @@ void main() { score: 0, balls: 0, bonusHistory: [], - activatedDashNests: {}, ); whenListen(bloc, Stream.value(state), initialState: state); return bloc; diff --git a/test/game/components/flutter_forest_test.dart b/test/game/components/flutter_forest_test.dart index 7ad5a3de..2089b7b7 100644 --- a/test/game/components/flutter_forest_test.dart +++ b/test/game/components/flutter_forest_test.dart @@ -79,105 +79,21 @@ void main() { ); }); - group('controller', () { - group('listenWhen', () { - final gameBloc = MockGameBloc(); - final flameBlocTester = FlameBlocTester( - gameBuilder: TestGame.new, - blocBuilder: () => gameBloc, - ); - - flameBlocTester.testGameWidget( - 'listens when a Bonus.dashNest and a bonusBall is added', - verify: (game, tester) async { - final flutterForest = FlutterForest(); - - const state = GameState( - score: 0, - balls: 3, - activatedDashNests: {}, - bonusHistory: [GameBonus.dashNest], - ); - - expect( - flutterForest.controller - .listenWhen(const GameState.initial(), state), - isTrue, - ); - }, - ); - }); - }); - - flameTester.test( - 'onNewState adds a new ball after a duration', - (game) async { - final flutterForest = FlutterForest(); - await game.ensureAdd(flutterForest); - - final previousBalls = game.descendants().whereType().length; - flutterForest.controller.onNewState(MockGameState()); - - await Future.delayed(const Duration(milliseconds: 700)); - await game.ready(); - - expect( - game.descendants().whereType().length, - greaterThan(previousBalls), - ); - }, - ); - - flameTester.test( - 'onNewState starts Dash animatronic', - (game) async { - final flutterForest = FlutterForest(); - await game.ensureAdd(flutterForest); - - flutterForest.controller.onNewState(MockGameState()); - final dashAnimatronic = - game.descendants().whereType().single; - - expect(dashAnimatronic.playing, isTrue); - }, - ); - group('bumpers', () { late Ball ball; late GameBloc gameBloc; setUp(() { ball = Ball(baseColor: const Color(0xFF00FFFF)); - gameBloc = MockGameBloc(); - whenListen( - gameBloc, - const Stream.empty(), - initialState: const GameState.initial(), - ); }); final flameBlocTester = FlameBlocTester( gameBuilder: EmptyPinballTestGame.new, - blocBuilder: () => gameBloc, - ); - - flameBlocTester.testGameWidget( - 'add DashNestActivated event', - setUp: (game, tester) async { - final flutterForest = FlutterForest(); - await game.ensureAdd(flutterForest); - await game.ensureAdd(ball); - - final bumpers = - flutterForest.descendants().whereType(); - - for (final bumper in bumpers) { - beginContact(game, bumper, ball); - final controller = bumper.firstChild()!; - verify( - () => gameBloc.add(DashNestActivated(controller.id)), - ).called(1); - } + blocBuilder: () { + gameBloc = MockGameBloc(); + const state = GameState.initial(); + whenListen(gameBloc, Stream.value(state), initialState: state); + return gameBloc; }, ); @@ -185,8 +101,10 @@ void main() { 'add Scored event', setUp: (game, tester) async { final flutterForest = FlutterForest(); - await game.ensureAdd(flutterForest); - await game.ensureAdd(ball); + await game.ensureAddAll([ + flutterForest, + ball, + ]); game.addContactCallback(BallScorePointsCallback(game)); final bumpers = flutterForest.descendants().whereType(); @@ -201,122 +119,58 @@ void main() { } }, ); - }); - }); - - group('DashNestBumperController', () { - late DashNestBumper dashNestBumper; - setUp(() { - dashNestBumper = MockDashNestBumper(); - }); - - group( - 'listensWhen', - () { - late GameState previousState; - late GameState newState; - - setUp( - () { - previousState = MockGameState(); - newState = MockGameState(); - }, - ); - - test('listens when the id is added to activatedDashNests', () { - const id = ''; - final controller = DashNestBumperController( - dashNestBumper, - id: id, - ); - - when(() => previousState.activatedDashNests).thenReturn({}); - when(() => newState.activatedDashNests).thenReturn({id}); - - expect(controller.listenWhen(previousState, newState), isTrue); - }); - - test('listens when the id is removed from activatedDashNests', () { - const id = ''; - final controller = DashNestBumperController( - dashNestBumper, - id: id, - ); - - when(() => previousState.activatedDashNests).thenReturn({id}); - when(() => newState.activatedDashNests).thenReturn({}); - - expect(controller.listenWhen(previousState, newState), isTrue); - }); - - test("doesn't listen when the id is never in activatedDashNests", () { - final controller = DashNestBumperController( - dashNestBumper, - id: '', - ); - - when(() => previousState.activatedDashNests).thenReturn({}); - when(() => newState.activatedDashNests).thenReturn({}); - - expect(controller.listenWhen(previousState, newState), isFalse); - }); - - test("doesn't listen when the id still in activatedDashNests", () { - const id = ''; - final controller = DashNestBumperController( - dashNestBumper, - id: id, - ); - - when(() => previousState.activatedDashNests).thenReturn({id}); - when(() => newState.activatedDashNests).thenReturn({id}); - - expect(controller.listenWhen(previousState, newState), isFalse); - }); - }, - ); - - group( - 'onNewState', - () { - late GameState state; - - setUp(() { - state = MockGameState(); - }); - - test( - 'activates the bumper when id in activatedDashNests', - () { - const id = ''; - final controller = DashNestBumperController( - dashNestBumper, - id: id, - ); - - when(() => state.activatedDashNests).thenReturn({id}); - controller.onNewState(state); + flameBlocTester.testGameWidget( + 'adds GameBonus.dashNest to the game when 3 bumpers are activated', + setUp: (game, _) async { + final ball = Ball(baseColor: const Color(0xFFFF0000)); + final flutterForest = FlutterForest(); + await game.ensureAddAll([flutterForest, ball]); - verify(() => dashNestBumper.activate()).called(1); - }, - ); + final bumpers = flutterForest.children.whereType(); + expect(bumpers.length, equals(3)); + for (final bumper in bumpers) { + beginContact(game, bumper, ball); + await game.ready(); + + if (bumper == bumpers.last) { + verify( + () => gameBloc.add(const BonusActivated(GameBonus.dashNest)), + ).called(1); + } else { + verifyNever( + () => gameBloc.add(const BonusActivated(GameBonus.dashNest)), + ); + } + } + }, + ); - test( - 'deactivates the bumper when id not in activatedDashNests', - () { - final controller = DashNestBumperController( - dashNestBumper, - id: '', - ); + flameBlocTester.testGameWidget( + 'deactivates bumpers when 3 are active', + setUp: (game, _) async { + final ball = Ball(baseColor: const Color(0xFFFF0000)); + final flutterForest = FlutterForest(); + await game.ensureAddAll([flutterForest, ball]); - when(() => state.activatedDashNests).thenReturn({}); - controller.onNewState(state); + final bumpers = [ + MockDashNestBumper(), + MockDashNestBumper(), + MockDashNestBumper(), + ]; - verify(() => dashNestBumper.deactivate()).called(1); - }, - ); - }, - ); + for (final bumper in bumpers) { + flutterForest.controller.activateBumper(bumper); + await game.ready(); + + if (bumper == bumpers.last) { + for (final bumper in bumpers) { + verify(bumper.deactivate).called(1); + } + } + } + }, + ); + }); }); } diff --git a/test/game/components/game_flow_controller_test.dart b/test/game/components/game_flow_controller_test.dart index 8bb81a6c..b9a6181a 100644 --- a/test/game/components/game_flow_controller_test.dart +++ b/test/game/components/game_flow_controller_test.dart @@ -16,7 +16,6 @@ void main() { score: 10, balls: 0, bonusHistory: const [], - activatedDashNests: const {}, ); final previous = GameState.initial(); @@ -66,7 +65,6 @@ void main() { score: 10, balls: 0, bonusHistory: const [], - activatedDashNests: const {}, ), ); diff --git a/test/game/components/score_effect_controller_test.dart b/test/game/components/score_effect_controller_test.dart index 9d2b5310..b5c76dc6 100644 --- a/test/game/components/score_effect_controller_test.dart +++ b/test/game/components/score_effect_controller_test.dart @@ -31,7 +31,6 @@ void main() { score: 10, balls: 3, bonusHistory: [], - activatedDashNests: {}, ); expect(controller.listenWhen(previous, current), isTrue); }); @@ -44,7 +43,6 @@ void main() { score: 10, balls: 3, bonusHistory: [], - activatedDashNests: {}, ); expect(controller.listenWhen(null, current), isTrue); }, @@ -69,7 +67,6 @@ void main() { score: 10, balls: 3, bonusHistory: [], - activatedDashNests: {}, ); controller.onNewState(state); @@ -87,7 +84,6 @@ void main() { score: 10, balls: 3, bonusHistory: [], - activatedDashNests: {}, ), ); @@ -96,7 +92,6 @@ void main() { score: 14, balls: 3, bonusHistory: [], - activatedDashNests: {}, ), ); diff --git a/test/game/view/game_hud_test.dart b/test/game/view/game_hud_test.dart index 2d5f50d9..cdc56832 100644 --- a/test/game/view/game_hud_test.dart +++ b/test/game/view/game_hud_test.dart @@ -12,7 +12,6 @@ void main() { const initialState = GameState( score: 10, balls: 2, - activatedDashNests: {}, bonusHistory: [], );