'use strict';
import DeckBuildingScene from './deck-building-scene';
import { Faction } from '../../common/utils/const/faction-enum';
import * as Utils from '../../common/utils/prompt-renderer';

export default class FactionDeckBuildingScene extends DeckBuildingScene {

  constructor(gameEventListener) {
    super();
    this.gameEventListener = gameEventListener;
  }

  preload() {
    console.log('Preload');

  }

  create() {
    console.log('create');


    setTimeout(() => {
      let factionOptions = Object.values(Faction).filter(faction => faction !== Faction.NONE);
      //let pBlueFaction = Utils.promptSelectAmongOptions("Select Player Blue Faction", factionOptions);
      let pBlueFaction = "meca";
      factionOptions = factionOptions.filter(faction => faction !== pBlueFaction);
      //let pRedFaction = Utils.promptSelectAmongOptions("Select Player Red Faction", factionOptions);
      let pRedFaction = "orcs";
      this.gameEventListener.onFactionsSelected(pBlueFaction, pRedFaction );
    }, 100);
  }

  update() {

  }
}

