#pragma once
#include "Command.h"

class BuildCommand : public Command
{
public:
  BuildCommand(BehaviorState& state, BWAPI::UnitType unitType, BWAPI::TilePosition position)
    : Command(state), m_unitType(unitType), m_position(position)
  {
  }
  virtual bool execute(BWAPI::Unit* unit) const
  {
    return unit->build(m_position, m_unitType);
  }
protected:
  virtual void _output(std::ostream& out) const
  {
    out << "Build " << m_unitType << " at " << m_position;
  }

  const BWAPI::UnitType m_unitType;
  const BWAPI::TilePosition m_position;
};