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

Points decrement for wrong answers #9

Merged
merged 6 commits into from
Jul 10, 2022
Merged

Points decrement for wrong answers #9

merged 6 commits into from
Jul 10, 2022

Conversation

BrajBliss
Copy link
Contributor

@BrajBliss BrajBliss commented Jul 9, 2022

Related Issue/Addition to code

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change required a documentation update

Proposed Changes

  • Added a function that reduces the points by 100 and if the user reaches zero, it will stay on zero and not add negative scores.
  • Documented it in the Rules and fixed a typo.

Checklist:

  • My code follows the style guidelines of this project and have read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@BrajBliss
Copy link
Contributor Author

BrajBliss commented Jul 9, 2022

One thing though, if the prettier formatting is not what you want (it replaced the double quotes with single quotes, whitespace, etc, that is why it shows so many changes), I can re-format by making another commit.

@KendallDoesCoding
Copy link
Owner

One thing though, if the prettier formatting is not what you want (it replaced the double quotes with single quotes, whitespace, etc, that is why it shows so many changes), I can re-format by making another commit.

Yeah, no worries. I use that extension too!

Copy link
Owner

@KendallDoesCoding KendallDoesCoding left a comment

Choose a reason for hiding this comment

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

Hey Vrindavan,

Thanks a lot for your contribution!!

Looks good, only issue I got is that if the first question goes wrong it doesn't minus any points, ideally it should -100 even for the first question, and then it ads back to positive once you get a question right? What do you think about that.

Also, I see you changed the button colors, it looks much better now, only issue is this color doesn't look too nice now, can you change it a little bit?
image

Thanks a ton,
Kendall Does Coding

@KendallDoesCoding KendallDoesCoding linked an issue Jul 10, 2022 that may be closed by this pull request
@BrajBliss
Copy link
Contributor Author

BrajBliss commented Jul 10, 2022

Oh sorry, I pressed the review button again. Anyway, that is weird because I did not change the colors at all. I just added the function in the js file and rules in the rules file.
I can make it so that it reduces points even on the first question but before I do that: can you tell me if you want the lowest score to reach -100 or even lower?

@KendallDoesCoding
Copy link
Owner

Oh sorry, I pressed the review button again. Anyway, that is weird because I did not change the colors at all. I just added the function in the js file and rules in the rules file.

Oh sorry, I got confused, you didn't change the colors, dw about it.

I can make it so that it reduces points even on the first question but before I do that: can you tell me if you want the lowest score to reach -100 or even lower?

If the person gets all the questions wrong, per question it -100 so if they get 15 questions wrong -1500, if it's a 10 question quiz and they get 5 wrong and 5 correct, score will be zero. Let's see how that would work out.

Copy link
Contributor Author

@BrajBliss BrajBliss left a comment

Choose a reason for hiding this comment

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

I have removed the 0 cap so now score can go below zero and removed that from rules also.

@KendallDoesCoding
Copy link
Owner

I have removed the 0 cap so now score can go below zero and removed that from rules also.

Works perfectly. Thanks for your contribution.

@KendallDoesCoding KendallDoesCoding merged commit 0b3c589 into KendallDoesCoding:main Jul 10, 2022
@KendallDoesCoding
Copy link
Owner

Hey @vrindavan , I require this done for all the quizzes, which can be seen in https://quiz.kendalldoescoding.gq/topics/ you did it only for the main one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it so that every wrong answer removes 100 points
2 participants