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

#54 - [Game Service] Question generator and retriever #56

Merged
merged 12 commits into from
Feb 25, 2025

Conversation

adrianmfuentes
Copy link

I am opening this pull request in order to have feedback about the implementation of the game retriever, issue #54 , created by @carlosfernandezmartinez. This feedback is important before merging the changes to the master branch.

In this link you can find the game service package, where you can find all the classes implemented for this issue (there are also some classes of issue #53). My classes are:

  • RouterQuestionRetriever

  • Server

Disclaimer

To check the behavior please read the comments on issue #54

@adrianmfuentes adrianmfuentes self-assigned this Feb 24, 2025
@adrianmfuentes adrianmfuentes linked an issue Feb 24, 2025 that may be closed by this pull request
Copy link

@carlosfernandezmartinez carlosfernandezmartinez left a comment

Choose a reason for hiding this comment

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

The service retrieves the whole set of questions of the DB. It should be configurable.

@adrianmfuentes
Copy link
Author

Thanks for your feedback. It is true that returning the whole database is not practical, I did not think about it when developing the router, but thanks for figuring it out. Now the router is properly updated with two path variables, the first for the number of questions you want and the latter for the number of choices per question you want, as you can see here:
image
Note that, if no values are specified, by default, there will be 3 questions with 3 choices each (this can be changed whenever).

Also, I have added extra randomness to the questions selection from the ones retrieved by the database in order not to return them sequentially, as can be visualized in the following picture:
image

Please, review it and notify me if there are any changes or improvements needed.

Copy link

@carlosfernandezmartinez carlosfernandezmartinez left a comment

Choose a reason for hiding this comment

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

Now everything's nice, even though you forgot to make the parameters optional, I fixed it for you 👵 ⛷️ 🥇

@carlosfernandezmartinez carlosfernandezmartinez merged commit 3ea73fe into master Feb 25, 2025
1 check passed
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.

[Game Service] Question generator and retriever
2 participants