-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestcase.cpp
More file actions
32 lines (28 loc) · 841 Bytes
/
testcase.cpp
File metadata and controls
32 lines (28 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <random>
#include <iostream>
#include <fstream>
#include <iomanip>
int main() {
int n = 10; //number of bots to be generated
int m;
int k = 2;
int min_bot_power = 10;
int max_bot_power = 100;
std::ofstream outfile;
outfile.open("combat.txt", std::ios::out);
std::random_device dev;
std::mt19937 rng(dev()); //rng device read here: https://www.cplusplus.com/reference/random/mt19937/
std::uniform_int_distribution<std::mt19937::result_type> dist6(0,25);
m = 5;
outfile << n << " " << m << " " << k << std::endl;
for (int i = 0 ; i < n ; i++) {
int f, d;
f = dist6(rng);
d = dist6(rng)/2+1;
outfile << f << " " << f+d << std::endl;
}
for (int i = 0 ; i < m ; i++) {
outfile << dist6(rng) << std::endl;
}
outfile.close();
}