#pragma once

#include <set>
#include <map>

#include "LDTypes.h"
#include "Universe.h"



class PlayerData
{
  public:

    std::set<LD::ResourceType>            m_Radars;

    std::map<LD::ResourceType,int>        m_Resources;

    std::map<std::pair<tPoint,int>,std::set<tPoint> >    m_CollectedResources;

    std::set<LD::ShopItem>                m_BoughtItems;

    std::map<std::pair<tPoint,int>,std::set<tPoint> >    m_DestroyedUnits;


    int                         m_Oxygen;
    int                         m_OxygenPerExpedition;

    long long                   m_Credits;



    PlayerData();


    void                        Init();

    bool                        HasCollected( Universe::Star* pStar, int PlanetIndex, LD::Resource& Resource );
    void                        Collect( Universe::Star* pStar, int PlanetIndex, LD::Resource& Resource );

    bool                        HasBought( LD::ShopItem Item );
    void                        Buy( LD::ShopItem Item, long long Cost );

    int                         PossibleTravelDistance();

    bool                        CanEnterPlanet( Universe::Planet* pPlanet );
    LD::VehicleType             SuggestVehicle( Universe::Planet* pPlanet );

    void                        Destroyed( Universe::Star* pStars, int PlanetIndex, int X, int Y );
    bool                        HasDestroyed( Universe::Star* pStar, int PlanetIndex, int X, int Y );

};
