added racelistgenerator + changed title of windows with drivers and car statistics

This commit is contained in:
2018-12-11 14:59:00 +01:00
parent ddb632c4fd
commit 5d31497f1c
7 changed files with 284 additions and 13 deletions

35
racelistgenerator.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef RACELISTGENERATOR_H
#define RACELISTGENERATOR_H
#include <algorithm> // shuffle list
#include <ctime>
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;
struct Combination {
int driver;
int car;
};
class RaceListGenerator
{
public:
RaceListGenerator(vector<int> driverIds, vector<int> carIds);
vector<vector<int>> getList() ;
private:
void print(vector<int> v);
static int myrandom(int i);
bool matchList(vector<struct Combination> x1, vector<struct Combination> x2);
bool matchCombination(struct Combination x1, struct Combination x2);
vector<int> driverIds;
vector<int> carIds;
};
#endif // RACELISTGENERATOR_H