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
This commit is contained in:
parent
52c78ae86a
commit
c3e745da5e
|
|
@ -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!",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Start a simple HTTP server on port 8000
|
||||
python3 -m http.server 8000
|
||||
python3 -m http.server 3000
|
||||
Loading…
Reference in New Issue