MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / CalculateFitness

Method CalculateFitness

Player.js:284–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

282 }
283
284 CalculateFitness() {
285 // current best fitness max just including height is 640,000, getting a coin has to be the most important thing so
286 let coinValue = 500000;
287 let heightThisLevel = (this.bestHeightReached - (height * this.bestLevelReached));
288 this.fitness = heightThisLevel * heightThisLevel + coinValue * this.numberOfCoinsPickedUp;
289 }
290
291 Update() {
292 if (this.playersDead)//|| this.hasFinishedInstructions)

Callers 1

CalculateFitnessSumMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected