chore: add more colored assets (#217)

* chore: add new assets and clean up code

* style: trailing comma

* refactor: use duration variable
pull/219/head
Allison Ryan 2 years ago committed by GitHub
parent 8f3e1c0c95
commit 38602c8dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -39,22 +39,6 @@ class Wall extends BodyComponent {
}
}
/// Create top, left, and right [Wall]s for the game board.
List<Wall> createBoundaries(Forge2DGame game) {
final topLeft = BoardDimensions.bounds.topLeft.toVector2() + Vector2(18.6, 0);
final bottomRight = BoardDimensions.bounds.bottomRight.toVector2();
final topRight =
BoardDimensions.bounds.topRight.toVector2() - Vector2(18.6, 0);
final bottomLeft = BoardDimensions.bounds.bottomLeft.toVector2();
return [
Wall(start: topLeft, end: topRight),
Wall(start: topRight, end: bottomRight),
Wall(start: topLeft, end: bottomLeft),
];
}
/// {@template bottom_wall}
/// [Wall] located at the bottom of the board.
///

@ -46,7 +46,8 @@ class PinballGame extends Forge2DGame
unawaited(add(CameraController(this)));
unawaited(add(Backboard.waiting(position: Vector2(0, -88))));
await _addGameBoundaries();
// TODO(allisonryan0002): banish Wall and Board classes in later PR.
await add(BottomWall());
unawaited(addFromBlueprint(Boundaries()));
unawaited(addFromBlueprint(ControlledSparkyComputer()));
@ -77,11 +78,6 @@ class PinballGame extends Forge2DGame
addContactCallback(BottomWallBallContactCallback());
}
Future<void> _addGameBoundaries() async {
await add(BottomWall());
createBoundaries(this).forEach(add);
}
Future<void> _addBonusWord() async {
await add(
GoogleWord(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 825 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 KiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

@ -22,7 +22,6 @@ class Baseboard extends BodyComponent with InitialPosition {
final BoardSide _side;
List<FixtureDef> _createFixtureDefs() {
final fixturesDef = <FixtureDef>[];
final direction = _side.direction;
const arcsAngle = 1.11;
final arcsRotation = (_side.isLeft) ? -2.7 : -1.6;
@ -30,12 +29,10 @@ class Baseboard extends BodyComponent with InitialPosition {
final pegBumperShape = CircleShape()..radius = 0.7;
pegBumperShape.position.setValues(11.11 * direction, -7.15);
final pegBumperFixtureDef = FixtureDef(pegBumperShape);
fixturesDef.add(pegBumperFixtureDef);
final topCircleShape = CircleShape()..radius = 0.7;
topCircleShape.position.setValues(9.71 * direction, -4.95);
final topCircleFixtureDef = FixtureDef(topCircleShape);
fixturesDef.add(topCircleFixtureDef);
final innerEdgeShape = EdgeShape()
..set(
@ -43,7 +40,6 @@ class Baseboard extends BodyComponent with InitialPosition {
Vector2(5.29 * direction, 0.95),
);
final innerEdgeShapeFixtureDef = FixtureDef(innerEdgeShape);
fixturesDef.add(innerEdgeShapeFixtureDef);
final outerEdgeShape = EdgeShape()
..set(
@ -51,7 +47,6 @@ class Baseboard extends BodyComponent with InitialPosition {
Vector2(3.79 * direction, 5.95),
);
final outerEdgeShapeFixtureDef = FixtureDef(outerEdgeShape);
fixturesDef.add(outerEdgeShapeFixtureDef);
final upperArcShape = ArcShape(
center: Vector2(0.09 * direction, -2.15),
@ -60,7 +55,6 @@ class Baseboard extends BodyComponent with InitialPosition {
rotation: arcsRotation,
);
final upperArcFixtureDef = FixtureDef(upperArcShape);
fixturesDef.add(upperArcFixtureDef);
final lowerArcShape = ArcShape(
center: Vector2(0.09 * direction, 3.35),
@ -69,7 +63,6 @@ class Baseboard extends BodyComponent with InitialPosition {
rotation: arcsRotation,
);
final lowerArcFixtureDef = FixtureDef(lowerArcShape);
fixturesDef.add(lowerArcFixtureDef);
final bottomRectangle = PolygonShape()
..setAsBox(
@ -79,9 +72,16 @@ class Baseboard extends BodyComponent with InitialPosition {
0,
);
final bottomRectangleFixtureDef = FixtureDef(bottomRectangle);
fixturesDef.add(bottomRectangleFixtureDef);
return fixturesDef;
return [
pegBumperFixtureDef,
topCircleFixtureDef,
innerEdgeShapeFixtureDef,
outerEdgeShapeFixtureDef,
upperArcFixtureDef,
lowerArcFixtureDef,
bottomRectangleFixtureDef,
];
}
@override
@ -100,21 +100,26 @@ class Baseboard extends BodyComponent with InitialPosition {
}
class _BaseboardSpriteComponent extends SpriteComponent with HasGameRef {
_BaseboardSpriteComponent({required BoardSide side}) : _side = side;
_BaseboardSpriteComponent({required BoardSide side})
: _side = side,
super(
anchor: Anchor.center,
position: Vector2(0.4 * -side.direction, 0),
);
final BoardSide _side;
@override
Future<void> onLoad() async {
await super.onLoad();
final sprite = await gameRef.loadSprite(
(_side.isLeft)
? Assets.images.baseboard.left.keyName
: Assets.images.baseboard.right.keyName,
final sprite = Sprite(
gameRef.images.fromCache(
(_side.isLeft)
? Assets.images.baseboard.left.keyName
: Assets.images.baseboard.right.keyName,
),
);
this.sprite = sprite;
size = sprite.originalSize / 10;
position = Vector2(0.4 * -_side.direction, 0);
anchor = Anchor.center;
}
}

@ -32,8 +32,6 @@ class _BottomBoundary extends BodyComponent with InitialPosition {
}
List<FixtureDef> _createFixtureDefs() {
final fixturesDefs = <FixtureDef>[];
final bottomLeftCurve = BezierCurveShape(
controlPoints: [
Vector2(-43.9, 41.8),
@ -42,7 +40,6 @@ class _BottomBoundary extends BodyComponent with InitialPosition {
],
);
final bottomLeftCurveFixtureDef = FixtureDef(bottomLeftCurve);
fixturesDefs.add(bottomLeftCurveFixtureDef);
final bottomRightCurve = BezierCurveShape(
controlPoints: [
@ -52,9 +49,8 @@ class _BottomBoundary extends BodyComponent with InitialPosition {
],
);
final bottomRightCurveFixtureDef = FixtureDef(bottomRightCurve);
fixturesDefs.add(bottomRightCurveFixtureDef);
return fixturesDefs;
return [bottomLeftCurveFixtureDef, bottomRightCurveFixtureDef];
}
@override
@ -68,16 +64,22 @@ class _BottomBoundary extends BodyComponent with InitialPosition {
}
class _BottomBoundarySpriteComponent extends SpriteComponent with HasGameRef {
_BottomBoundarySpriteComponent()
: super(
anchor: Anchor.center,
position: Vector2(-5.4, 55.6),
);
@override
Future<void> onLoad() async {
await super.onLoad();
final sprite = await gameRef.loadSprite(
Assets.images.boundary.bottom.keyName,
final sprite = Sprite(
gameRef.images.fromCache(
Assets.images.boundary.bottom.keyName,
),
);
this.sprite = sprite;
size = sprite.originalSize / 10;
anchor = Anchor.center;
position = Vector2(-5.4, 55.6);
}
}
@ -96,15 +98,12 @@ class _OuterBoundary extends BodyComponent with InitialPosition {
}
List<FixtureDef> _createFixtureDefs() {
final fixturesDefs = <FixtureDef>[];
final topWall = EdgeShape()
..set(
Vector2(3.6, -70.2),
Vector2(-14.1, -70.2),
);
final topWallFixtureDef = FixtureDef(topWall);
fixturesDefs.add(topWallFixtureDef);
final topLeftCurve = BezierCurveShape(
controlPoints: [
@ -114,7 +113,6 @@ class _OuterBoundary extends BodyComponent with InitialPosition {
],
);
final topLeftCurveFixtureDef = FixtureDef(topLeftCurve);
fixturesDefs.add(topLeftCurveFixtureDef);
final leftWall = EdgeShape()
..set(
@ -122,9 +120,12 @@ class _OuterBoundary extends BodyComponent with InitialPosition {
Vector2(-43.9, 41.8),
);
final leftWallFixtureDef = FixtureDef(leftWall);
fixturesDefs.add(leftWallFixtureDef);
return fixturesDefs;
return [
topWallFixtureDef,
topLeftCurveFixtureDef,
leftWallFixtureDef,
];
}
@override
@ -138,15 +139,21 @@ class _OuterBoundary extends BodyComponent with InitialPosition {
}
class _OuterBoundarySpriteComponent extends SpriteComponent with HasGameRef {
_OuterBoundarySpriteComponent()
: super(
anchor: Anchor.center,
position: Vector2(0, -7.8),
);
@override
Future<void> onLoad() async {
await super.onLoad();
final sprite = await gameRef.loadSprite(
Assets.images.boundary.outer.keyName,
final sprite = Sprite(
gameRef.images.fromCache(
Assets.images.boundary.outer.keyName,
),
);
this.sprite = sprite;
size = sprite.originalSize / 10;
anchor = Anchor.center;
position = Vector2(-0.2, -1.4);
}
}

@ -17,12 +17,12 @@ class DashAnimatronic extends SpriteAnimationComponent with HasGameRef {
Future<void> onLoad() async {
await super.onLoad();
final spriteSheet = await gameRef.images.load(
final spriteSheet = gameRef.images.fromCache(
Assets.images.dash.animatronic.keyName,
);
const amountPerRow = 12;
const amountPerColumn = 8;
const amountPerRow = 13;
const amountPerColumn = 6;
final textureSize = Vector2(
spriteSheet.width / amountPerRow,
spriteSheet.height / amountPerColumn,

@ -60,7 +60,6 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition {
}
List<FixtureDef> _createFixtureDefs() {
final fixturesDef = <FixtureDef>[];
final direction = side.direction;
final assetShadow = Flipper.size.x * 0.012 * -direction;
@ -77,7 +76,6 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition {
0,
);
final bigCircleFixtureDef = FixtureDef(bigCircleShape);
fixturesDef.add(bigCircleFixtureDef);
final smallCircleShape = CircleShape()..radius = size.y * 0.23;
smallCircleShape.position.setValues(
@ -87,7 +85,6 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition {
0,
);
final smallCircleFixtureDef = FixtureDef(smallCircleShape);
fixturesDef.add(smallCircleFixtureDef);
final trapeziumVertices = side.isLeft
? [
@ -108,9 +105,12 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition {
density: 50, // TODO(alestiago): Use a proper density.
friction: .1, // TODO(alestiago): Use a proper friction.
);
fixturesDef.add(trapeziumFixtureDef);
return fixturesDef;
return [
bigCircleFixtureDef,
smallCircleFixtureDef,
trapeziumFixtureDef,
];
}
@override
@ -136,21 +136,24 @@ class Flipper extends BodyComponent with KeyboardHandler, InitialPosition {
}
class _FlipperSpriteComponent extends SpriteComponent with HasGameRef {
_FlipperSpriteComponent({required BoardSide side}) : _side = side;
_FlipperSpriteComponent({required BoardSide side})
: _side = side,
super(anchor: Anchor.center);
final BoardSide _side;
@override
Future<void> onLoad() async {
await super.onLoad();
final sprite = await gameRef.loadSprite(
(_side.isLeft)
? Assets.images.flipper.left.keyName
: Assets.images.flipper.right.keyName,
final sprite = Sprite(
gameRef.images.fromCache(
(_side.isLeft)
? Assets.images.flipper.left.keyName
: Assets.images.flipper.right.keyName,
),
);
this.sprite = sprite;
size = sprite.originalSize / 10;
anchor = Anchor.center;
}
}

@ -49,7 +49,7 @@ abstract class RenderPriority {
static const int launchRamp = _above + outerBoudary;
static const int launchRampForegroundRailing = _above + ballOnLaunchRamp;
static const int launchRampForegroundRailing = _below + ballOnBoard;
static const int plunger = _above + launchRamp;
@ -63,7 +63,7 @@ abstract class RenderPriority {
static const int dinoBottomWall = _above + dino;
static const int slingshot = _above + ballOnBoard;
static const int slingshot = _above + dinoBottomWall;
// Flutter Forest
@ -71,7 +71,7 @@ abstract class RenderPriority {
static const int dashBumper = _above + ballOnBoard;
static const int dashAnimatronic = _above + launchRampForegroundRailing;
static const int dashAnimatronic = 2 * _above + launchRamp;
// Sparky Fire Zone

@ -49,18 +49,15 @@ class Slingshot extends BodyComponent with InitialPosition {
final double _angle;
List<FixtureDef> _createFixtureDefs() {
final fixturesDef = <FixtureDef>[];
const circleRadius = 1.55;
final topCircleShape = CircleShape()..radius = circleRadius;
topCircleShape.position.setValues(0, -_length / 2);
final topCircleFixtureDef = FixtureDef(topCircleShape);
fixturesDef.add(topCircleFixtureDef);
final bottomCircleShape = CircleShape()..radius = circleRadius;
bottomCircleShape.position.setValues(0, _length / 2);
final bottomCircleFixtureDef = FixtureDef(bottomCircleShape);
fixturesDef.add(bottomCircleFixtureDef);
final leftEdgeShape = EdgeShape()
..set(
@ -72,8 +69,6 @@ class Slingshot extends BodyComponent with InitialPosition {
restitution: 5,
);
fixturesDef.add(leftEdgeShapeFixtureDef);
final rightEdgeShape = EdgeShape()
..set(
Vector2(-circleRadius, _length / 2),
@ -83,9 +78,13 @@ class Slingshot extends BodyComponent with InitialPosition {
rightEdgeShape,
restitution: 5,
);
fixturesDef.add(rightEdgeShapeFixtureDef);
return fixturesDef;
return [
topCircleFixtureDef,
bottomCircleFixtureDef,
leftEdgeShapeFixtureDef,
rightEdgeShapeFixtureDef,
];
}
@override
@ -118,7 +117,7 @@ class _SlinghsotSpriteComponent extends SpriteComponent with HasGameRef {
@override
Future<void> onLoad() async {
await super.onLoad();
final sprite = await gameRef.loadSprite(_path);
final sprite = Sprite(gameRef.images.fromCache(_path));
this.sprite = sprite;
size = sprite.originalSize / 10;
}

@ -10,11 +10,16 @@ import '../../helpers/helpers.dart';
void main() {
group('Baseboard', () {
TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(TestGame.new);
final assets = [
Assets.images.baseboard.left.keyName,
Assets.images.baseboard.right.keyName,
];
final flameTester = FlameTester(() => TestGame(assets));
flameTester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.images.loadAll(assets);
final leftBaseboard = Baseboard(
side: BoardSide.left,
)..initialPosition = Vector2(-20, 0);
@ -24,6 +29,7 @@ void main() {
await game.ensureAddAll([leftBaseboard, rightBaseboard]);
game.camera.followVector2(Vector2.zero());
await tester.pump();
},
verify: (game, tester) async {
await expectLater(

@ -10,15 +10,20 @@ import '../../helpers/helpers.dart';
void main() {
group('Boundaries', () {
final assets = [
Assets.images.boundary.outer.keyName,
Assets.images.boundary.bottom.keyName,
];
final tester = FlameTester(TestGame.new);
tester.testGameWidget(
'render correctly',
setUp: (game, tester) async {
await game.images.loadAll(assets);
await game.addFromBlueprint(Boundaries());
game.camera.followVector2(Vector2.zero());
game.camera.zoom = 3.9;
await game.ready();
game.camera.zoom = 3.2;
await tester.pump();
},
verify: (game, tester) async {
await expectLater(

@ -9,29 +9,33 @@ import '../../helpers/helpers.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(TestGame.new);
final asset = Assets.images.dash.animatronic.keyName;
final flameTester = FlameTester(() => TestGame([asset]));
group('DashAnimatronic', () {
flameTester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.images.load(asset);
await game.ensureAdd(DashAnimatronic()..playing = true);
game.camera.followVector2(Vector2.zero());
await tester.pump();
},
verify: (game, tester) async {
const animationDuration = 3.25;
await expectLater(
find.byGame<TestGame>(),
matchesGoldenFile('golden/dash_animatronic/start.png'),
);
game.update(1);
game.update(animationDuration * 0.25);
await tester.pump();
await expectLater(
find.byGame<TestGame>(),
matchesGoldenFile('golden/dash_animatronic/middle.png'),
);
game.update(4);
game.update(animationDuration * 0.75);
await tester.pump();
await expectLater(
find.byGame<TestGame>(),

@ -10,7 +10,11 @@ import '../../helpers/helpers.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(TestGame.new);
final assets = [
Assets.images.flipper.left.keyName,
Assets.images.flipper.right.keyName,
];
final flameTester = FlameTester(() => TestGame(assets));
group('Flipper', () {
// TODO(alestiago): Consider testing always both left and right Flipper.
@ -18,6 +22,7 @@ void main() {
flameTester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.images.loadAll(assets);
final leftFlipper = Flipper(
side: BoardSide.left,
)..initialPosition = Vector2(-10, 0);
@ -27,6 +32,7 @@ void main() {
await game.ensureAddAll([leftFlipper, rightFlipper]);
game.camera.followVector2(Vector2.zero());
await tester.pump();
},
verify: (game, tester) async {
await expectLater(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

@ -10,17 +10,22 @@ import '../../helpers/helpers.dart';
void main() {
group('Slingshot', () {
final flameTester = FlameTester(TestGame.new);
final assets = [
Assets.images.slingshot.upper.keyName,
Assets.images.slingshot.lower.keyName,
];
final flameTester = FlameTester(() => TestGame(assets));
const length = 2.0;
const angle = 0.0;
final spritePath = Assets.images.slingshot.upper.keyName;
flameTester.testGameWidget(
'renders correctly',
setUp: (game, tester) async {
await game.images.loadAll(assets);
await game.addFromBlueprint(Slingshots());
game.camera.followVector2(Vector2.zero());
await game.ready();
await tester.pump();
},
verify: (game, tester) async {
await expectLater(
@ -36,7 +41,7 @@ void main() {
final slingshot = Slingshot(
length: length,
angle: angle,
spritePath: spritePath,
spritePath: assets.first,
);
await game.ensureAdd(slingshot);
@ -50,7 +55,7 @@ void main() {
final slingshot = Slingshot(
length: length,
angle: angle,
spritePath: spritePath,
spritePath: assets.first,
);
await game.ensureAdd(slingshot);
@ -64,7 +69,7 @@ void main() {
final slingshot = Slingshot(
length: length,
angle: angle,
spritePath: spritePath,
spritePath: assets.first,
);
await game.ensureAdd(slingshot);
@ -82,7 +87,7 @@ void main() {
final slingshot = Slingshot(
length: length,
angle: angle,
spritePath: spritePath,
spritePath: assets.first,
);
await game.ensureAdd(slingshot);

@ -16,10 +16,15 @@ void main() {
Assets.images.dash.bumper.a.inactive.keyName,
Assets.images.dash.bumper.b.active.keyName,
Assets.images.dash.bumper.b.inactive.keyName,
Assets.images.dash.animatronic.keyName,
Assets.images.signpost.inactive.keyName,
Assets.images.signpost.active1.keyName,
Assets.images.signpost.active2.keyName,
Assets.images.signpost.active3.keyName,
Assets.images.baseboard.left.keyName,
Assets.images.baseboard.right.keyName,
Assets.images.flipper.left.keyName,
Assets.images.flipper.right.keyName,
];
final flameTester = FlameTester(() => EmptyPinballTestGame(assets));

@ -11,7 +11,11 @@ import '../../helpers/helpers.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
final flameTester = FlameTester(EmptyPinballTestGame.new);
final assets = [
Assets.images.flipper.left.keyName,
Assets.images.flipper.right.keyName,
];
final flameTester = FlameTester(() => EmptyPinballTestGame(assets));
final flameBlocTester = FlameBlocTester<EmptyPinballTestGame, GameBloc>(
gameBuilder: EmptyPinballTestGame.new,
@ -25,6 +29,7 @@ void main() {
whenListen(bloc, Stream.value(state), initialState: state);
return bloc;
},
assets: assets,
);
group('FlipperController', () {

@ -19,6 +19,7 @@ void main() {
Assets.images.dash.bumper.a.inactive.keyName,
Assets.images.dash.bumper.b.active.keyName,
Assets.images.dash.bumper.b.inactive.keyName,
Assets.images.dash.animatronic.keyName,
Assets.images.signpost.inactive.keyName,
Assets.images.signpost.active1.keyName,
Assets.images.signpost.active2.keyName,

@ -19,6 +19,7 @@ void main() {
Assets.images.dash.bumper.a.inactive.keyName,
Assets.images.dash.bumper.b.active.keyName,
Assets.images.dash.bumper.b.inactive.keyName,
Assets.images.dash.animatronic.keyName,
Assets.images.signpost.inactive.keyName,
Assets.images.signpost.active1.keyName,
Assets.images.signpost.active2.keyName,
@ -43,6 +44,14 @@ void main() {
Assets.images.spaceship.ramp.arrow.active3.keyName,
Assets.images.spaceship.ramp.arrow.active4.keyName,
Assets.images.spaceship.ramp.arrow.active5.keyName,
Assets.images.baseboard.left.keyName,
Assets.images.baseboard.right.keyName,
Assets.images.flipper.left.keyName,
Assets.images.flipper.right.keyName,
Assets.images.boundary.outer.keyName,
Assets.images.boundary.bottom.keyName,
Assets.images.slingshot.upper.keyName,
Assets.images.slingshot.lower.keyName,
];
final flameTester = FlameTester(() => PinballTestGame(assets));
final debugModeFlameTester = FlameTester(() => DebugPinballTestGame(assets));
@ -52,17 +61,6 @@ void main() {
// [BallScorePointsCallback] once the following issue is resolved:
// https://github.com/flame-engine/flame/issues/1416
group('components', () {
flameTester.test(
'has three Walls',
(game) async {
await game.ready();
final walls = game.children.where(
(component) => component is Wall && component is! BottomWall,
);
expect(walls.length, 3);
},
);
flameTester.test(
'has only one BottomWall',
(game) async {

Loading…
Cancel
Save