ricardoboss / Prolangle

A game about programming languages.
https://prolangle.ricardoboss.de
MIT License
2 stars 1 forks source link

weigh `_PickRandomLanguage` against the languages' TIOBE ratings #123

Open chucker opened 8 months ago

chucker commented 8 months ago

Implements #121.

I considered making this a service, but it would depend on the respective seed, so the code ultimately felt too bloated.

In this implementation, languages that don't have a TIOBE rating get a weight of 100. Languages with one range from 417 (PowerShell) to 7 (Python), so we may have to tweak the weighing here a bit. I get the sense we need to 'compress' it so that all of them are closer to 100, from both extremes.