import Phaser from "phaser";
import { BootScene } from "./scenes/BootScene";
import { GameScene } from "./scenes/GameScene";
import { MainMenuScene } from "./scenes/MainMenuScene";
import { LevelSelectScene } from "./scenes/LevelSelectScene";
import { LevelEditorScene } from "./scenes/LevelEditorScene";
import type { HudController } from "../ui/hud";

export function createGame(parent: HTMLElement, hud: HudController): Phaser.Game {
  return new Phaser.Game({
    type: Phaser.WEBGL,
    parent,
    width: 832,
    height: 576,
    backgroundColor: "#08121b",
    pixelArt: true,
    antialias: false,
    scene: [
      new BootScene(),
      new MainMenuScene(hud),
      new LevelSelectScene(hud),
      new LevelEditorScene(hud),
      new GameScene(hud)
    ]
  });
}
