From c3e745da5e7634ca1188e817c13a9798df824b4d Mon Sep 17 00:00:00 2001 From: Brian Fertig Date: Sun, 28 Jun 2026 20:23:13 -0600 Subject: [PATCH] fix: normalize opponent ID case and update battleship drag behavior - Change Maurice's opponent ID from "Maurice" to "maurice" for consistency - Replace Phaser disableInteractive/setDraggable with removeInteractive for fleet locking - Update development server port from 8000 to 3000 in start_web.sh --- data/opponents.json | 2 +- src/games/battleship/BattleshipGame.js | 2 +- start_web.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/opponents.json b/data/opponents.json index f6b202f..2d1379b 100644 --- a/data/opponents.json +++ b/data/opponents.json @@ -842,7 +842,7 @@ } }, { - "id": "Maurice", + "id": "maurice", "spriteIndex": 27, "name": "Maurice", "bio": "Bucky Beaver and I are there to TRAP all the fun and games!", diff --git a/src/games/battleship/BattleshipGame.js b/src/games/battleship/BattleshipGame.js index a326cb5..b2c0227 100644 --- a/src/games/battleship/BattleshipGame.js +++ b/src/games/battleship/BattleshipGame.js @@ -550,7 +550,7 @@ export default class BattleshipGame extends Phaser.Scene { if (this.gs.fleets.player1.length !== SHIPS.length) return; for (const piece of this.shipPieces) this._destroyArrow(piece); // Lock the player's fleet (no more dragging) and place the AI's. - for (const piece of this.shipPieces) { piece.container.disableInteractive(); this.input.setDraggable(piece.container, false); } + for (const piece of this.shipPieces) { piece.container.removeInteractive(); } this.placementUI.forEach((b) => b.destroy()); this.placementUI = []; this.gs.fleets.player2 = placeFleet(this.opponents[0]?.skill ?? 3); diff --git a/start_web.sh b/start_web.sh index ed7b91a..a92e9cc 100755 --- a/start_web.sh +++ b/start_web.sh @@ -1,4 +1,4 @@ #!/bin/bash # Start a simple HTTP server on port 8000 -python3 -m http.server 8000 \ No newline at end of file +python3 -m http.server 3000 \ No newline at end of file