Racing Web
pregen.h File Reference
#include <vector>
#include "src/Car.h"

Go to the source code of this file.

Functions

std::vector< std::vector< const Car * > > LoadPreGeneratedSchedule (const std::vector< Car > &roster)
 
std::vector< const Car * > BuildPreGenHeat (const std::vector< Car > &roster, const int one, const int two, const int three, const int four)
 

Function Documentation

◆ BuildPreGenHeat()

std::vector< const Car * > BuildPreGenHeat ( const std::vector< Car > &  roster,
const int  one,
const int  two,
const int  three,
const int  four 
)

helper function to generate a single heat. used in conjuction with https://stanpope.net/ppngen.html params one, two, three, four match indexes in the roster vector

Parameters
onethe roster vector index of the car to place in lane one
twothe roster vector index of the car to place in lane two
threethe roster vector index of the car to place in lane three
fourthe roster vector index of the car to place in lane four
Returns
a heat which can be added to the schedule

◆ LoadPreGeneratedSchedule()

std::vector< std::vector< const Car * > > LoadPreGeneratedSchedule ( const std::vector< Car > &  roster)

spits out a pre-generated schedule for 4 lanes using a more optimal pattern

Parameters
rostervector of cars in the race roster
Returns
completed race schedule as a vector of heats, each heat consisting of a vector of 4 cars