export class BattleField {
  constructor(scene, config = {}) {
    this.scene = scene;
    this.laneCount = config.laneCount || 4;
    this.playerY = config.playerY || 520;
    this.opponentY = config.opponentY || 200;
    this.commanderPlayerX = config.commanderPlayerX || 100;
    this.commanderOpponentX = config.commanderOpponentX || 100;
    this.laneStartX = config.laneStartX || 300;
    this.laneSpacing = config.laneSpacing || 120;
  }

  getLaneX(laneIndex) {
    return this.laneStartX + laneIndex * this.laneSpacing;
  }

  getPlayerLanePos(laneIndex) {
    return { x: this.getLaneX(laneIndex), y: this.playerY };
  }

  getOpponentLanePos(laneIndex) {
    return { x: this.getLaneX(laneIndex), y: this.opponentY };
  }

  getPlayerCommanderPos() {
    return { x: this.commanderPlayerX, y: this.playerY };
  }

  getOpponentCommanderPos() {
    return { x: this.commanderOpponentX, y: this.opponentY };
  }
}
