import { Game } from 'phaser';

import PreloadScene from "./scenes/PreloadScene";
import PlayScene from "./scenes/PlayScene";

const config: Phaser.Types.Core.GameConfig = {
    type: Phaser.AUTO,
    scale: {
        mode: Phaser.Scale.RESIZE,   // Automatically resize game based on window size
    },
    pixelArt: true,
    transparent: true,
    physics: {
        default: 'arcade',
        arcade: {
            // debug: true
        }
    },
    scene: [PreloadScene, PlayScene]
};

const StartGame = (parent: string) => {
    return new Game({ ...config, parent });
}

export default StartGame;
