Skip to content

Conversation

Anshuman7080
Copy link

Functionality Encapsulation: Created get_computer_choice() to handle the computer's choice logic, making it clearer and more modular.
Winner Determination: Simplified determine_winner() to handle all win/lose conditions with fewer checks.
Input Handling: Added a space before %c in scanf to ignore any leading whitespace or newline characters.
Variable Names: Made variable names more descriptive, such as player_choice and computer_choice, for better readability.
This should keep the functionality intact while improving clarity and efficiency!

@Anshuman7080 Anshuman7080 reopened this Oct 12, 2024
@Anshuman7080
Copy link
Author

this is a valid pull request

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.

1 participant