CodingTrain / Directional-Boring

Horizontal Directional Drilling Simulation
MIT License
46 stars 21 forks source link

Scoring, difficulty, and organization #29

Closed kfahn22 closed 2 years ago

kfahn22 commented 2 years ago

I have added a slider for number of boulders, added a score based on path length and difficulty and reorganized a bit. I am also storing best score to local storage. No need to merge if you don't want--I am using as a learning tool.

I don't understand why there are small spacing differences as I pulled latest version. 😟

hdd

https://kfahn22.github.io/Directional-Boring/

alin256 commented 2 years ago

How did you decide to compute the score?

kfahn22 commented 2 years ago

This may not be best, but this is the current scoring. (I just changed because I realized I had it wrong.).

level is number of boulders (out of 20)

// Give credit for higher randonness // Give higher penalty for lower number of boulders when stuck let df = 0.01(randomSlider.value()/100); score = int((1-df)length + ( 20 / level ) * stuckCount);