hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Feat/enhance get random game

Open zamitto opened this issue 1 year ago • 0 comments

Refactor logic of getting random games

  1. On the first call of getRandomGame, Hydra makes all the requests to steam250 pages
  2. Removes duplicates games from the list
  3. Removes games that are not indexed on Hydra
  4. And shuffles the resulting list
  5. Now, on each new call to getRandomGame, there's no need to make a new request, it just gets the next game on the list
  6. If the end of the list is reached, it is shuffled again and moves the index to the start of the list

Other adjustments

  • Makes the Surprise me button disabled until the game details page finishes loading, preventing a click spam on the button that could cause some strange behaviours on the page

zamitto avatar Apr 28 '24 01:04 zamitto