diff --git a/src/engine/game-engine.js b/src/engine/game-engine.js index d9795fe..5e50185 100644 --- a/src/engine/game-engine.js +++ b/src/engine/game-engine.js @@ -23,7 +23,7 @@ class GameEngine { setupPlayers() { const homeTeamPositions = [ - { role: 'G', x: 80, y: 300 }, + { role: 'G', x: 10, y: 300 }, { role: 'LD', x: 200, y: 220 }, { role: 'RD', x: 200, y: 380 }, { role: 'LW', x: 350, y: 200 }, @@ -32,7 +32,7 @@ class GameEngine { ]; const awayTeamPositions = [ - { role: 'G', x: 920, y: 300 }, + { role: 'G', x: 970, y: 300 }, { role: 'LD', x: 800, y: 220 }, { role: 'RD', x: 800, y: 380 }, { role: 'LW', x: 650, y: 200 }, diff --git a/src/entities/player.js b/src/entities/player.js index 7e28349..4c15ab8 100644 --- a/src/entities/player.js +++ b/src/entities/player.js @@ -167,8 +167,8 @@ class Player { updateGoalie(gameState, puck, players) { const goal = this.team === 'home' ? - new Vector2(50, gameState.rink.centerY) : - new Vector2(gameState.rink.width - 50, gameState.rink.centerY); + new Vector2(10, gameState.rink.centerY) : + new Vector2(gameState.rink.width - 10, gameState.rink.centerY); const crease = { x: goal.x - 30, diff --git a/src/systems/renderer.js b/src/systems/renderer.js index 0c363f1..8fd4c72 100644 --- a/src/systems/renderer.js +++ b/src/systems/renderer.js @@ -111,12 +111,12 @@ class Renderer { const goalY = rink.centerY; this.ctx.beginPath(); - this.ctx.arc(60, goalY, creaseRadius, -Math.PI/2, Math.PI/2); + this.ctx.arc(0, goalY, creaseRadius, -Math.PI/2, Math.PI/2); this.ctx.fill(); this.ctx.stroke(); this.ctx.beginPath(); - this.ctx.arc(rink.width - 60, goalY, creaseRadius, Math.PI/2, -Math.PI/2); + this.ctx.arc(rink.width, goalY, creaseRadius, Math.PI/2, -Math.PI/2); this.ctx.fill(); this.ctx.stroke(); }