index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-26 18:19:35 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-26 18:19:35 -0700 |
commit | 00323b63ebbe461f59eb2fa05ef458c12bd9482f (patch) | |
tree | 9cac1f9e7c26184d7cd080c045f01a1f9ad5669a /src/modules/game.js | |
parent | f07d120b4bb245a76bdd80712a33ba8b222d966a (diff) |
Make sight line module a function instead of a class
Diffstat (limited to 'src/modules/game.js')
-rw-r--r-- | src/modules/game.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/game.js b/src/modules/game.js index b44d605..260da72 100644 --- a/src/modules/game.js +++ b/src/modules/game.js @@ -12,6 +12,7 @@ export default class Game { this.svg = svg; const board = this.getBoard(); + this.firingArc = new FiringArc(svg, board); this.sightLine = new SightLine(svg, board); this.counter = new Counter(svg); @@ -89,7 +90,7 @@ export default class Game { * @param {(count: [number]) => void} fn */ set distanceCallback(fn) { - this.sightLine.distanceCallback = fn; + this.sightLine.setDistanceCallback(fn); } endMove() { @@ -104,8 +105,6 @@ export default class Game { select(selected) { const counter = this.counter.getCounter(selected); - console.log(counter); - if (counter) { this.unSelect(); this.placing.push(counter); |