Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void generateMap(size_t w, size_t h, ofstream& sv_file) {
- sv_file << h << " " << w << endl;
- for (size_t r = 0; r < h; r++) {
- for (size_t c = 0; c < w; c++) {
- int type = random(10);
- if (type == 2) sv_file << "b";
- else if (type == 6) sv_file << "#";
- else if (type == 8) sv_file << "a";
- else sv_file << " ";
- }
- sv_file << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement