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

First working demo of random price generation #10

Merged
merged 14 commits into from
Apr 9, 2024
Merged

First working demo of random price generation #10

merged 14 commits into from
Apr 9, 2024

Conversation

84ds84d8s
Copy link
Collaborator

The code should work with distinct outputs each time a function is called.
All these code are based on std: mt19937 (https://cplusplus.com/reference/random/mt19937/) and std::normal_distribution (https://en.cppreference.com/w/cpp/numeric/random/normal_distribution)

@eric15342335
Copy link
Owner

I will review this very soon. It is on my track.

@eric15342335 eric15342335 added the Comp: random Use of srand(), rand(), anything with the word "random" label Apr 9, 2024
Copy link
Owner

@eric15342335 eric15342335 left a comment

Choose a reason for hiding this comment

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

TL;DR:

  1. random_sd() can return a negative value (which is invalid)
  2. Formatting (indentation, namespace std::, comments)

random_price.cpp Outdated Show resolved Hide resolved
random_price.cpp Show resolved Hide resolved
random_price.cpp Outdated Show resolved Hide resolved
random_price.cpp Outdated Show resolved Hide resolved
random_price.cpp Show resolved Hide resolved
random_price.h Outdated Show resolved Hide resolved
@eric15342335 eric15342335 added this to the Third Meeting milestone Apr 9, 2024
random_price.cpp Outdated Show resolved Hide resolved
eric15342335
eric15342335 previously approved these changes Apr 9, 2024
@eric15342335
Copy link
Owner

Note that you can start writing the README.md for the Generation of random game sets or events, or you can let @Prismatiscence do that.

eric15342335
eric15342335 previously approved these changes Apr 9, 2024
Copy link
Owner

@eric15342335 eric15342335 left a comment

Choose a reason for hiding this comment

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

Looks very good. I don't mind there is no one empty line between two functions to separate them. LGTM! 🚀

@84ds84d8s 84ds84d8s merged commit 14fba8a into eric15342335:main Apr 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp: random Use of srand(), rand(), anything with the word "random"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants