From ea3341323a843147e8dc57b8a60a33ff92ec81d9 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Fri, 26 Apr 2024 21:04:08 -0700
Subject: Remove calling sight line module with 'new'
---
src/modules/game.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'src/modules/game.js')
diff --git a/src/modules/game.js b/src/modules/game.js
index 260da72..62cca1e 100644
--- a/src/modules/game.js
+++ b/src/modules/game.js
@@ -14,7 +14,10 @@ export default class Game {
const board = this.getBoard();
this.firingArc = new FiringArc(svg, board);
- this.sightLine = new SightLine(svg, board);
+ this.sightLine = SightLine(svg, board);
+
+ console.log(this.sightLine);
+
this.counter = new Counter(svg);
this.setUpCells();
@@ -90,7 +93,7 @@ export default class Game {
* @param {(count: [number]) => void} fn
*/
set distanceCallback(fn) {
- this.sightLine.setDistanceCallback(fn);
+ this.sightLine.distanceCallback = fn;
}
endMove() {
--
cgit v1.2.3