From dd806c938a7c76dc05ae7239b0802a4cf92e396f Mon Sep 17 00:00:00 2001 From: alestiago Date: Wed, 13 Apr 2022 10:51:58 +0100 Subject: [PATCH] refactor: applied PR suggestions --- lib/game/components/google_word.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/game/components/google_word.dart b/lib/game/components/google_word.dart index d3fb4376..19c98a5d 100644 --- a/lib/game/components/google_word.dart +++ b/lib/game/components/google_word.dart @@ -8,12 +8,12 @@ import 'package:pinball/flame/flame.dart'; import 'package:pinball/game/game.dart'; import 'package:pinball_components/pinball_components.dart'; -/// {@template bonus_word} +/// {@template google_word} /// Loads all [GoogleLetter]s to compose a [GoogleWord]. /// {@endtemplate} class GoogleWord extends Component with HasGameRef, Controls<_GoogleWordController> { - /// {@macro bonus_word} + /// {@macro google_word} GoogleWord({ required Vector2 position, }) : _position = position { @@ -51,8 +51,6 @@ class _GoogleWordController extends ComponentController with HasGameRef { _GoogleWordController(GoogleWord googleWord) : super(googleWord); - static const _googleWord = 'Google'; - final _activatedLetters = {}; void activate(GoogleLetter googleLetter) { @@ -60,7 +58,7 @@ class _GoogleWordController extends ComponentController googleLetter.activate(); - final activatedBonus = _activatedLetters.length == _googleWord.length; + final activatedBonus = _activatedLetters.length == 6; if (activatedBonus) { gameRef.audio.googleBonus(); gameRef.read().add(const BonusActivated(GameBonus.word));