tylerdood / clocktowertimer

https://clocktowertimer.com
3 stars 1 forks source link

add math to determine array used for timer #21

Closed tydood closed 8 months ago

tydood commented 8 months ago

This will generate an array based on the player count which will then be applied to the timer, so we don't have to manually input the array's for each player count. It will take a range (startValue and endValue), then apply an exponential decay where the amount of points on the line is determined by totalNumbers. For example:

startValue = 12 endValue = 3 totalNumbers = 12

The array generated: [12, 10.5, 9.25, 8.25, 7.25, 6.5, 5.75, 5, 4.5, 3.75, 3.5, 3]

This will allow for easy adjusting down the line. In the future, we can give players the option to adjust these numbers, as opposed to inputing an entire array of numbers.

Need to add

cloudflare-workers-and-pages[bot] commented 8 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0adb89b
Status: ✅  Deploy successful!
Preview URL: https://862c289a.clocktower-timer.pages.dev
Branch Preview URL: https://starting-player-count.clocktower-timer.pages.dev

View logs