00001 00011 #ifndef __SIMULATION_H__ 00012 #define __SIMULATION_H__ 00013 00014 #include <iltcommon.h> 00015 00016 #include "Aria.h" 00017 #include "Heuristic.h" 00018 #include "aviary.h" 00019 #include "boidmodel.h" 00020 #include "peckermodel.h" 00021 00022 #define NUM_AVIARIES AV_NUMBOIDTYPES 00023 #define MAX_BOIDS_PER_AVIARY 4 00024 #define MAX_BOIDS (NUM_AVIARIES * MAX_BOIDS_PER_AVIARY) 00025 #define NUM_PECKERS 4 00026 00031 class Simulation 00032 { 00033 public: 00037 Simulation(); 00038 00042 ~Simulation(); 00043 00048 void Init(); 00049 00055 void Update(); 00056 00060 void UpdateWoodpeckers(); 00061 00067 void CalculateAverageBeatTime(); 00068 00077 void SetBeatDelta(long beatDelta, long timestamp); 00078 00084 void Analyze(); 00085 00091 char * GetHeuristic(); 00092 00100 bool SetHeuristic(HeuristicType type); 00101 00109 inline float GetRating(unsigned int participant); 00110 00119 void AddMusicBeat(uint8 beat, long timestamp); 00120 00129 void AddDrumHit(uint8 pad, long timestamp); 00130 00136 void Attract(); 00137 00138 private: 00139 SimulationStatus status; 00140 Heuristic *heuristic; 00141 Aviary *aviaries[NUM_AVIARIES]; 00142 CPeckerModel *woodpeckers[NUM_PECKERS]; 00143 }; 00144 00145 #endif /* __SIMULATION_H__ */