From c7721f2b1aa9f1117289fec3cc907325ab023de2 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Sat, 18 Jul 2026 12:54:32 +0300 Subject: [PATCH] =?UTF-8?q?feat(ball):=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=D0=B5=20=D0=BF=D0=BE=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B8=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=83=D0=B3=D0=BE=D0=BB=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D1=82=D0=B0=20=D0=BC=D1=8F=D1=87=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 2 +- src/game.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index 20c039a..85861db 100644 --- a/src/config.js +++ b/src/config.js @@ -6,7 +6,7 @@ export const PADDLE_HEIGHT = 10; export const BALL_RADIUS = 10; export const BALL_SPEED = 3; -export const BALL_INITIAL_ANGLE = 180; +export const BALL_INITIAL_ANGLE = 0; export const BRICK_WIDTH = 40; export const BRICK_HEIGHT = 10; diff --git a/src/game.js b/src/game.js index 9cc511f..22c28cb 100644 --- a/src/game.js +++ b/src/game.js @@ -24,8 +24,8 @@ export class Game { */ constructor(columnAmount, rowAmount) { this.ball = new Ball( - 100, - 100, + CONTAINER_WIDTH / 2 - BALL_RADIUS, + CONTAINER_HEIGHT / 2 - BALL_RADIUS, BALL_RADIUS, BALL_SPEED * Math.cos(BALL_INITIAL_ANGLE), -1 * BALL_SPEED * Math.sin(BALL_INITIAL_ANGLE),