From 82dcc3e0b594765165e3adf0bfa3b894c3efa957 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Sat, 18 Jul 2026 10:52:19 +0300 Subject: [PATCH] =?UTF-8?q?chore(view):=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D1=82=D0=B8=D0=BF=20=D0=B0=D1=80?= =?UTF-8?q?=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/view.js b/src/view.js index 0c86337..4aaec1b 100644 --- a/src/view.js +++ b/src/view.js @@ -67,6 +67,10 @@ export function createGameView(game, container) { */ export function syncronizeViewsWithGame(views, game) { try { + if (!(game instanceof Game)) { + throw new Error('Аргумент game должен быть экземпляром класса Game'); + } + views.ball.x = game.ball.x; views.ball.y = game.ball.y;