SoniaBarasa / country-capital-quiz-game

This repository is for general learning purposes. Aim is to learn conventional way to write a python code.
1 stars 2 forks source link

Hide input so players cannot see each other's answers #3

Closed alimanfoo closed 1 year ago

alimanfoo commented 1 year ago

Currently the answer provided by each player is visible on the screen. This means that player 2 is at an advantage, because they can see what player 1 answered before they give their answer. So if player 2 didn't know, they could just copy player 1.

The game could be made more fair by hiding the answers that each player provides. Then, only after both players have given their answers, the game could reveal what the correct answer is.

One way to implement this would be to use the getpass() function from the standard library.

alimanfoo commented 1 year ago

Hi @SoniaBarasa, what do you think? If you like the idea, I'd be happy to submit a pull request 🙂

Hi Alistair, I think the idea is actually great, because as you mentioned , the second player can just copy the first player's response . great thought!

alimanfoo commented 1 year ago

Ah sorry, I think this issue might be a duplicate of #1? Apologies, I might have got confused. If this is a duplicate, please feel free to close this issue, and we can continue the discussion over in #1.

alimanfoo commented 1 year ago

Actually, I think this suggestion is slightly different from what is in #1. I guess in #1 you are suggesting for the game to not report whether the answer is correct until both players have taken a turn. Here I am suggesting that the player input should be hidden so they cannot copy each other.

SoniaBarasa commented 1 year ago

@alimanfoo you are right ! the two issues are quite different, so I agree to the suggestion. Please go ahead and submit a pull request!

ahernank commented 1 year ago

@SoniaBarasa when answering to comments, it is a good idea to add new ones every time. If not, they can get lost in the conversation, and it is hard to follow-up. For example, here your comment has the risk of getting lost (and the people following this issue won't get a notification for it): Screenshot 2023-05-01 at 10 45 33

If you want to answer to an earlier comment, you can quote it using > at the start of the line, followed by the text in the comment. Then, you can answer to the comment below. If we re-write the text in the comment above with this format:

Hi @SoniaBarasa, what do you think? If you like the idea, I'd be happy to submit a pull request 🙂

Hi Alistair, I think the idea is actually great, because as you mentioned , the second player can just copy the first player's response . great thought!

SoniaBarasa commented 1 year ago

@ahernank Thank you for the valuable comments.