feat(perk): Добавлен бонус clone который добавляет 2 дополнительных мяча
This commit is contained in:
@@ -48,6 +48,17 @@ describe('updatePerks', () => {
|
||||
expect(paddle.width).toBe(PADDLE_WIDE_WIDTH);
|
||||
});
|
||||
|
||||
it('Ловит бонус clone, разделяет мяч на три', () => {
|
||||
const game = new Game([[[1]]]);
|
||||
const { paddle } = game;
|
||||
game.perks.push(new Perk(paddle.x, paddle.y - 1, 10, 10, 'clone', 0));
|
||||
|
||||
updatePerks(game, 600, 1);
|
||||
|
||||
expect(game.perks).toHaveLength(0);
|
||||
expect(game.balls).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('Убирает бонус, улетевший за нижнюю границу', () => {
|
||||
const game = new Game([[[1]]]);
|
||||
game.perks.push(new Perk(0, 601, 10, 10, 'slow', 0));
|
||||
|
||||
Reference in New Issue
Block a user