X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTraffic%2FSchedule.hxx;h=bfda8c0fe4e4ea532d7febf14628b60d3e1e325e;hb=b090d3dabce3ad1261fb4b514cb71ed0c8a4d29b;hp=75661bceb5fe51dae5205b2b418d7dde39ad6f68;hpb=c1e1e2f54114516ed950862afb4ea797964896fd;p=flightgear.git diff --git a/src/Traffic/Schedule.hxx b/src/Traffic/Schedule.hxx index 75661bceb..bfda8c0fe 100644 --- a/src/Traffic/Schedule.hxx +++ b/src/Traffic/Schedule.hxx @@ -53,9 +53,12 @@ class FGAISchedule double groundOffset; double distanceToUser; int AIManagerRef; - //int score; + double score; + unsigned int runCount; + unsigned int hits; bool firstRun; double courseToDest; + bool initialized; void scheduleFlights(); @@ -107,10 +110,17 @@ class FGAISchedule const string& getFlightRules () { return (*flights.begin())->getFlightRules (); }; bool getHeavy () { return heavy; }; double getCourse () { return courseToDest; }; + unsigned int getRunCount () { return runCount; }; + unsigned int getHits () { return hits; }; + + void setrunCount(unsigned int count) { runCount = count; }; + void setHits (unsigned int count) { hits = count; }; + void setScore () { score = runCount ? ((double) hits / (double) runCount) : 0; }; + double getScore () { return score; }; FGScheduledFlight*findAvailableFlight (const string ¤tDestination, const string &req); // used to sort in decending order of score: I've probably found a better way to // decending order sorting, but still need to test that. - //bool operator< (const FGAISchedule &other) const { return (score > other.score); }; + bool operator< (const FGAISchedule &other) const { return (score > other.score); }; //void * getAiRef () { return AIManagerRef; }; //FGAISchedule* getAddress () { return this;};