Skip to content

refactor: Clean up the RandomValue code#2370

Draft
Caball009 wants to merge 15 commits intoTheSuperHackers:mainfrom
Caball009:refactor_random_value
Draft

refactor: Clean up the RandomValue code#2370
Caball009 wants to merge 15 commits intoTheSuperHackers:mainfrom
Caball009:refactor_random_value

Conversation

@Caball009
Copy link

@Caball009 Caball009 commented Mar 1, 2026

This PR cleans up RandomValue.cpp:

  • Removes code that was commented out.
  • Reorders functions so that they are in a consistent order (1 client, 2 audio, 3 logic).
  • Makes the GetGame... functions resemble each other as much as possible.
  • Adds assertions for random values that fall outside the min — max range.
  • Optimizes the initialization of theMultFactor.
  • Changes the early return logic for the GetGame... functions.
  • Changes pass by pointer to pass by reference for the seed arrays.
  • Changes a few minor miscellaneous things to improve consistency or formatting.

@Caball009 Caball009 added Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing labels Mar 1, 2026
@Caball009 Caball009 force-pushed the refactor_random_value branch from 8632bfb to ad2f66b Compare March 1, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants