Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-04-26 21:04:08 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-04-26 21:04:08 -0700
commitea3341323a843147e8dc57b8a60a33ff92ec81d9 (patch)
tree76ecca3670c3567699545eaf63dfec2b12ae03de /src/modules/game.js
parent00323b63ebbe461f59eb2fa05ef458c12bd9482f (diff)
Remove calling sight line module with 'new'
Diffstat (limited to 'src/modules/game.js')
-rw-r--r--src/modules/game.js7
1 files changed, 5 insertions, 2 deletions
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() {