#ifndef IELECTRIC_MACHINE_HPP_
#define IELECTRIC_MACHINE_HPP_

#include <Utilities/Extern.hpp>
#include <Side/Side.hpp>

class LocalWorld;

/**
 * @brief Interface implemented by machines which use or produce energy.
 */
class IElectricMachine
{
public:
    virtual ~IElectricMachine() = default;

    /**
     * @brief Return true if electric wires can connect to the specified side.
     */
    virtual bool canConnectElectricWire(Side side) = 0;

    /**
     * @brief Returns true if energy can be drained from the specified side.
     *
     * By default always returns false.
     */
    virtual bool canDrainEnergyFromSide(Side side);

    /**
     * @brief Called when a nonzero amount of energy has been drained from the machine.
     *
     * Does nothing by default.
     */
    virtual void onEnergyDrained(int amount);
};

#endif