Revert "fix space between goalie and goal"

This reverts commit 69c2d2282dcd29e554def64524e600442cbfe328.
This commit is contained in:
Pierre Wessman 2025-09-16 19:06:21 +02:00
parent dfc112c516
commit 31015bf280
3 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ class GameEngine {
setupPlayers() {
const homeTeamPositions = [
{ role: 'G', x: 10, y: 300 },
{ role: 'G', x: 80, y: 300 },
{ role: 'LD', x: 200, y: 220 },
{ role: 'RD', x: 200, y: 380 },
{ role: 'LW', x: 350, y: 200 },
@ -36,7 +36,7 @@ class GameEngine {
];
const awayTeamPositions = [
{ role: 'G', x: 970, y: 300 },
{ role: 'G', x: 920, y: 300 },
{ role: 'LD', x: 800, y: 220 },
{ role: 'RD', x: 800, y: 380 },
{ role: 'LW', x: 650, y: 200 },

View File

@ -246,8 +246,8 @@ class Player {
*/
updateGoalie(gameState, puck, players) {
const goal = this.team === 'home' ?
new Vector2(10, gameState.rink.centerY) :
new Vector2(gameState.rink.width - 10, gameState.rink.centerY);
new Vector2(50, gameState.rink.centerY) :
new Vector2(gameState.rink.width - 50, gameState.rink.centerY);
const crease = {
x: goal.x - 30,

View File

@ -126,12 +126,12 @@ class Renderer {
const goalY = rink.centerY;
this.ctx.beginPath();
this.ctx.arc(0, goalY, creaseRadius, -Math.PI/2, Math.PI/2);
this.ctx.arc(60, goalY, creaseRadius, -Math.PI/2, Math.PI/2);
this.ctx.fill();
this.ctx.stroke();
this.ctx.beginPath();
this.ctx.arc(rink.width, goalY, creaseRadius, Math.PI/2, -Math.PI/2);
this.ctx.arc(rink.width - 60, goalY, creaseRadius, Math.PI/2, -Math.PI/2);
this.ctx.fill();
this.ctx.stroke();
}