Research Article
Artificial Intelligence in Video Games: Towards a Unified Framework
Algorithm 17
Conceptual view code in the onStart callback function. Map dimensions in BW are given in build tiles, each build tile representing a 32 by 32 area.
void GravenAIModule::onStart() | { | ⋯ | //Create 2D world | cptWorld = new CptWorld2D(); | //Add an empty map | cptWorld->pSetMap(new CptMap2D()); | //Set map dimensions | cptWorld->GetMap()->pSetSizeX(Broodwar->mapWidth() 32); | cptWorld->GetMap()->pSetSizeY(Broodwar->mapHeight() 32); | } |
|