B.A.R.G.A.M.E.  v2.0
El Farol Bar Problem Implementation
 All Classes Namespaces Files Functions Variables Typedefs Defines
Doxygen Specific Source Code/Town.h
Go to the documentation of this file.
00001 #ifndef TOWN_H
00002 #define TOWN_H
00003 
00004 #include "Graph.h"
00005 #include "Bar.h"
00006 #include "Agent.h"
00007 using namespace std;
00008 
00010 
00015 class Town{
00016 public:
00017 
00022         Town();
00023         
00028         ~Town();
00029 
00051         Town(int number_bars,int population,int user_cap[],bool isPercent,int grpSize,int avgAge2,int dropValue) );
00052         
00053         
00067         void createBars(int numbars,int user_cap[],bool isPercent);
00068         
00080         void createGroups(int population,int numGrps,int avgAge,int dropValue);
00081         
00091         graphPtr turn();
00092         
00102         int* goingToBar();
00103         
00115         int* getWinners(int a[256]);
00116         
00125         void tellWinners(int a[256]);
00126 
00127         
00135         void Town::popcontrol();
00136 
00137 protected:
00138         
00142         int numBars;
00143         
00148         int numPeeps;
00149         
00153         Bar barNums[256];
00154         
00158         Agent people[16384];
00159         
00163         int *STM;
00164         
00170         graphPtr Stuff;
00171         
00175         int grpSize;
00176 
00180         int numpeeps;
00181         
00185         int drop;
00186         
00190         Bar ** barnums;
00191         
00195         list<Group *> groups;
00196         
00200         list<Group *>::iterator it;
00201         
00205         Strategy ** topStrats;
00206         
00210         int STI;
00211         
00215         int avgAge;
00216 };
00217 
00218 #endif