Ooops cosmetics...
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3049 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 776945b5f234d7ee8af7d55b03b13cdeadd4440f Former-commit-id: e7cef0f12a9f0ec8e2f1581ec46021d41c81a58e
This commit is contained in:
parent
c54f8043b3
commit
689fe5b78e
1 changed files with 15 additions and 8 deletions
|
@ -29,18 +29,25 @@
|
|||
#include <robottools.h> // Rt*
|
||||
#include <robot.h> // ROB_PIT_IM
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams), used for logging only
|
||||
#include <sstream>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
// #define DEBUG
|
||||
#ifdef DEBUG
|
||||
#include <iostream> // NOLINT(readability/streams), used for logging only
|
||||
using ::std::cout;
|
||||
#endif
|
||||
|
||||
#include "src/drivers/kilo2008/opponent.h"
|
||||
#include "src/drivers/kilo2008/strategy.h"
|
||||
#include "src/drivers/kilo2008/pit.h"
|
||||
#include "src/drivers/kilo2008/raceline.h"
|
||||
#include "src/drivers/kilo2008/util.h"
|
||||
|
||||
// #define DEBUG
|
||||
using ::std::string;
|
||||
using ::std::stringstream;
|
||||
using ::std::list;
|
||||
|
||||
// "I AM DEATH, NOT TAXES. *I* TURN UP ONLY ONCE." -- Death
|
||||
// Fear was theirs, not yers.
|
||||
|
@ -781,7 +788,7 @@ void KDriver::initTrack(tTrack * t, void *carHandle,
|
|||
// Create a pit stop strategy object.
|
||||
m_strategy = new KStrategy();
|
||||
// Init fuel.
|
||||
m_strategy->setFuelAtRaceStart(t, carParmHandle, s, INDEX);
|
||||
m_strategy->SetFuelAtRaceStart(t, carParmHandle, s, INDEX);
|
||||
|
||||
m_raceline = new LRaceLine;
|
||||
// m_raceline->setSkill(m_skill);
|
||||
|
@ -809,7 +816,7 @@ void KDriver::update(tSituation * s) {
|
|||
m_currentSpeedSqr = pow(m_car->_speed_x, 2);
|
||||
|
||||
m_opponents->update(s, this);
|
||||
m_strategy->update();
|
||||
m_strategy->Update();
|
||||
|
||||
checkPitStatus(s);
|
||||
m_pit->update();
|
||||
|
@ -837,7 +844,7 @@ void KDriver::checkPitStatus(tSituation *s) {
|
|||
if ((m_car->_distFromStartLine < m_pit->getNPitEntry()
|
||||
|| m_car->_distFromStartLine > m_pit->getNPitEnd())
|
||||
|| m_car->_fuel < 5.0) {
|
||||
m_pit->setPitstop(m_strategy->needPitstop());
|
||||
m_pit->setPitstop(m_strategy->NeedPitstop());
|
||||
}
|
||||
} // if no pit planned
|
||||
|
||||
|
@ -906,8 +913,8 @@ double KDriver::filterBColl(const double brake) {
|
|||
|
||||
// Set pitstop commands.
|
||||
int KDriver::pitCommand(tSituation * s) {
|
||||
m_car->_pitRepair = m_strategy->pitRepair();
|
||||
m_car->_pitFuel = m_strategy->pitRefuel();
|
||||
m_car->_pitRepair = m_strategy->PitRepair();
|
||||
m_car->_pitFuel = m_strategy->PitRefuel();
|
||||
// This should be the only place where the pit stop is set to false!
|
||||
m_pit->setPitstop(false);
|
||||
return ROB_PIT_IM; // return immediately.
|
||||
|
@ -915,7 +922,7 @@ int KDriver::pitCommand(tSituation * s) {
|
|||
|
||||
|
||||
void KDriver::newRace(tCarElt * car, tSituation * s) {
|
||||
m_strategy->setCar(car);
|
||||
m_strategy->set_car(car);
|
||||
|
||||
double deltaTime = static_cast<double>(RCM_MAX_DT_ROBOTS);
|
||||
MAX_UNSTUCK_COUNT = static_cast<int>(UNSTUCK_TIME_LIMIT / deltaTime);
|
||||
|
|
Loading…
Reference in a new issue