BWAPI
SnippyHolloW-BroodwarBotQ-f01ab56/src/Intelligence/EEcoEstimator.h
Go to the documentation of this file.
00001 #pragma once
00002 #include "CSingleton.h"
00003 #include "TimeManager.h"
00004 #include <BWAPI.h>
00005 #include <BWTA.h>
00006 
00007 
00008 class EEcoEstimator : public CSingleton<EEcoEstimator>
00009 {
00010         friend class CSingleton<EEcoEstimator>;
00011 public:
00012         void setDependencies();
00013         virtual void update();
00014         int m_per_mn() const;//Requires a first call to update workers else uses theorical number of workers
00015         int g_per_mn() const;//Requires a first call to update workers else uses theorical number of workers
00016         void update_workers(int mworkers, int gworkers);
00017         void add_workers(int mworkers, int gworkers);
00018         void rm_workers(int mworkers, int gworkers);
00019 
00020         void update_minerals_geyzers(int patch, int geyzers);
00021 
00022         int get_theo_workers() const;
00023         void start_gaz(int gworkers);
00024         //gworkers correspond to the number of workers on the refinery
00025         //Take care, gworkers is added directly to the number of workers on gaz
00026         //And the number of gaz_exploited is increased
00027 
00028 private:
00029         EEcoEstimator();
00030         ~EEcoEstimator();
00031         TimeManager* timeManager;
00032         int mWorkers;// workers on mineral
00033         int gWorkers;// workers on gaz
00034         int totWorkers;
00035         int patch_owned;
00036         int gaz_exploited;
00037         int gaz_owned;
00038         int seconds;
00039         int theo_workers;
00040 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines