import { makeAutoObservable, } from 'mobx';
import { LevelArr } from "@/pages/GamePage/Level/LevelConfig.ts";

class GameStore {

  constructor() {
    makeAutoObservable(this);
  }

  gameInfo = {
    levelIndex: -1,
    levelIdxArr: [],
  }

  async start() {
    this.gameInfo.levelIdxArr = LevelArr.map((_, index) => index);
    this.gameInfo.levelIdxArr.sort(() => Math.random() - 0.5);
    this.gameInfo.levelIndex = -1;
  }

  async submit() {

    const score = this.gameInfo.levelIndex;

  }
}

export default (new GameStore());
