|
|
@ -85,21 +85,22 @@ class BonusWord extends Component with BlocComponent<GameBloc, GameState> {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
final mirroredOffsets = offsets.reversed
|
|
|
|
final mirroredOffsets = offsets.reversed
|
|
|
|
.map((position) => Vector2(position.x * -1, position.y))
|
|
|
|
.map((position) => Vector2(-position.x, position.y))
|
|
|
|
.toList();
|
|
|
|
.toList();
|
|
|
|
offsets.addAll(mirroredOffsets);
|
|
|
|
offsets.addAll(mirroredOffsets);
|
|
|
|
assert(offsets.length == GameBloc.bonusWord.length, 'Invalid positions');
|
|
|
|
assert(offsets.length == GameBloc.bonusWord.length, 'Invalid positions');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final letters = <BonusLetter>[];
|
|
|
|
for (var i = 0; i < GameBloc.bonusWord.length; i++) {
|
|
|
|
for (var i = 0; i < GameBloc.bonusWord.length; i++) {
|
|
|
|
unawaited(
|
|
|
|
letters.add(
|
|
|
|
add(
|
|
|
|
BonusLetter(
|
|
|
|
BonusLetter(
|
|
|
|
letter: GameBloc.bonusWord[i],
|
|
|
|
letter: GameBloc.bonusWord[i],
|
|
|
|
index: i,
|
|
|
|
index: i,
|
|
|
|
)..initialPosition = _position + offsets[i],
|
|
|
|
)..initialPosition = _position + offsets[i],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await addAll(letters);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|