Skip to content

Instantly share code, notes, and snippets.

@rgbatty
Created August 20, 2014 20:37
Show Gist options
  • Save rgbatty/4ed80e2bd9cf88d4e2eb to your computer and use it in GitHub Desktop.
Save rgbatty/4ed80e2bd9cf88d4e2eb to your computer and use it in GitHub Desktop.
for(int i = 0; i < this->height*this->width; i++) {
int randNum = (rand() % 3 + 1);
switch(randNum) {
case 1:
this->tiles.push_back(tileAtlas.at("forest"));
break;
case 2:
this->tiles.push_back(tileAtlas.at("grass"));
break;
case 3:
this->tiles.push_back(tileAtlas.at("grass"));
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment