ZM Random map generator [Source Code]
Hey guys,
during the last years, people were so bored to choose, which zm map they should play.
So I decided to code myself a random map generator in c++. You can run this code snippet in the "Mobile C" App from the appstore for instance.
Obviously, you can use it for everything and not just zm maps. Like trying it out makes u better understand the black market since it really shatters your head sometimes, though it is basically just Sir Random, who let u win or lose.
Have fun:)
#include <iostream>
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
using namespace std;
int main()
{
int randomMap;
/* initialize random seed: */
srand (time(NULL));
/* generate random number: */
randomMap = rand() % 15 + 0;
cout << randomMap;
/* Array */
std::string maps[16] = { "Unearth",
"Biohazard",
"Venice",
"Valkyrie",
"Crater",
"Dinner Theater",
"EMD Lab",
"Devastated City",
"Final Arena",
"Crater Dawn",
"Elemental Temple",
"Shattered Station",
"Shipyard",
"Battleship",
"Deadly Tower",
"Fatal Canyon"
};
cout << "\n"+ maps[randomMap];
}
during the last years, people were so bored to choose, which zm map they should play.
So I decided to code myself a random map generator in c++. You can run this code snippet in the "Mobile C" App from the appstore for instance.
Obviously, you can use it for everything and not just zm maps. Like trying it out makes u better understand the black market since it really shatters your head sometimes, though it is basically just Sir Random, who let u win or lose.
Have fun:)
#include <iostream>
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
using namespace std;
int main()
{
int randomMap;
/* initialize random seed: */
srand (time(NULL));
/* generate random number: */
randomMap = rand() % 15 + 0;
cout << randomMap;
/* Array */
std::string maps[16] = { "Unearth",
"Biohazard",
"Venice",
"Valkyrie",
"Crater",
"Dinner Theater",
"EMD Lab",
"Devastated City",
"Final Arena",
"Crater Dawn",
"Elemental Temple",
"Shattered Station",
"Shipyard",
"Battleship",
"Deadly Tower",
"Fatal Canyon"
};
cout << "\n"+ maps[randomMap];
}
Comments
-
Sorry pal I can't understand your point. I am a lazy guy and I don't want to waste my time over it Can you please keep it simple and tell us about what you experienced?
Experience? You better dont look for all posts in the forum, if you dont wanna waste your time -
amrfarouk144 wrote: »it cant be since there some maps with 4 members and some 5 and elem 8
Its not rly clear what OP wanted but apparently he is not requesting a feature for the game, rather giving code for those who dont have a 15 sided dice on hand and not able to decide themself what the want to play.
Categories
- All Categories
- Z8Games
- 1 Z8 Forum Discussion & Suggestions
- 15 Z8Games Announcements
- Rules & Conduct
- 2.5K CrossFire
- 709 CrossFire Announcements
- 712 Previous Announcements
- 2 Previous Patch Notes
- 319 Community
- 12 Modes
- 392 Suggestions
- 16 Clan Discussion and Recruitment
- 73 CF Competitive Forum
- 1 CFCL
- 16 Looking for a Team?
- 523 CrossFire Support
- 7 Suggestion
- 15 CrossFire Guides
- 38 CrossFire Off Topic