using UnityEngine;
using Hexagons;

public class GameManager : MonoBehaviour 
{
  public byte AmountOfParties;
  
  public HexGrid grid;
  public UIManager ui;
  
  private PartyManager _partyManager;
  private HexPathFinding _path;
  
  void Start() 
  {
    _path = new HexPathFinding(grid);
    _partyManager = new PartyManager(grid, _path, ui, AmountOfParties);
    
    grid.CreateGrid();
    // _partyManager.SpawnParties();
  }
  
  void Update() 
  {
    _partyManager.UpdateCurrentParty();
    
    if (Input.GetKeyDown (KeyCode.Space)) {
      grid.CreateGrid();
      _partyManager.ResetParties();
      _partyManager.SpawnParties();
    }
  }
}