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));