Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISS-26: Implement array_get_random / array_pop_random (yet again) #41

Merged
merged 9 commits into from
Aug 6, 2023

Conversation

Alphish
Copy link
Owner

@Alphish Alphish commented Aug 5, 2023

Building upon biyectivo's implementation from PR #39. Changes include:

  • returning undefined instead of 0 for empty arrays/subsections
  • tweaking JSDoc formatting and phrasing in array random functions
  • adding missing YY files and YYP references for test scripts
  • reworking tests in various ways

Copy link

@Mercerenies Mercerenies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few real minor notes.

Testing random functions is always a pain. In principle, I'd say "mock the random number generator" and use dependency injection to test it or something, but that's massively overengineered, especially since GM doesn't really have a good concept of non-global random generators.

Alphish added 2 commits August 6, 2023 15:16
Fixed the phrasing of the overall demo description, and also moved offset/length buttons and descriptions to have more space for array values listing.
@Mercerenies
Copy link

👍 LGTM!

@Alphish Alphish merged commit 5c59301 into main Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants