added racelistgenerator + changed title of windows with drivers and car statistics
This commit is contained in:
35
racelistgenerator.h
Normal file
35
racelistgenerator.h
Normal 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
|
||||
Reference in New Issue
Block a user