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

Wpm calculation #44

Closed
wants to merge 9 commits into from
Closed

Conversation

MercMayhem
Copy link
Contributor

  • Created new function get_string_till_space to get ExpectedInput string snippet till the space present at or after 'len' argument inputted
  • created a function to compare input and expected input snippet and return number correctly typed words
  • added tests for both
  • changed implementation of the wpm calculation to calculate based on number of correct words typed

Closes #5

@MercMayhem
Copy link
Contributor Author

@radlinskii can you review this?

@radlinskii
Copy link
Owner

Hey, Thank you for your contribution, I'm sorry @MercMayhem but I think I won't merge it, and close the issue. I've added the hacktoberfest-label already.

I started to think that this change is just not needed, and might be confusing.

If we were to add this change then we would need to update the colorising of words to display the whole word to some red color to show that the whole word is invalid and won't be counted.

Plus I think changes you made to computing the WPM, are obsolete, we should still count each word as 5 characters. So it would be more like how many characters were typed in the valid words, divided by 5, and that's how many valid "words" were typed.

@radlinskii radlinskii closed this Oct 27, 2023
@MercMayhem
Copy link
Contributor Author

No problem @radlinskii :) . Loved working on donkeytype. Will definitely be following this project post Hacktoberfest.

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

Successfully merging this pull request may close these issues.

Count WPM only in words that were typed correctly
2 participants