[WIP] Implement hangaman excercise#905
[WIP] Implement hangaman excercise#905vaibhavsingh97 wants to merge 1 commit intoexercism:masterfrom
Conversation
|
@m-a-ge I don't know much about writing test. Can you please guide me 😅 |
cfe8a1d to
0754601
Compare
ilya-khadykin
left a comment
There was a problem hiding this comment.
I've left some comments for you to consider
| class HangmanTest(unittest.TestCase): | ||
| def test(self): | ||
| self.assertEqual("hangman", "hangman") | ||
|
|
There was a problem hiding this comment.
More tests should be added
There was a problem hiding this comment.
@vaibhavsingh97, I would suggest basing the tests on the ones from the C# track since they have fairly good test coverage.
|
|
||
|
|
||
| def main(): | ||
| while True: |
There was a problem hiding this comment.
I don't like this infinite loop
There was a problem hiding this comment.
@m-a-ge This loop is only if player wan't to play again
| @@ -0,0 +1 @@ | |||
| # Hangman | |||
There was a problem hiding this comment.
You can adopt README.md from here - https://github.com/exercism/problem-specifications/blob/master/exercises/hangman/description.md
|
@vaibhavsingh97, it's a best practice to write tests before working on an actual implementation. It gives an opportunity to analyze the problem better, find edge cases etc. You can also adopt tests from other tracks |
|
The problem-specifications//description.md suggests that this should be a functional reactive programming (FRP) exercise using an external library. Such libraries seem to exist for Python, but I know nothing about them and I don't really understand what FRP really is. Unless you know what this is and can explain and implement it, I'm going to suggest that we just modify the exercise to use a more traditional paradigm. @m-a-ge, what are your thoughts on this? Your current implementation is going to be really hard to write tests for, because it relies on user interaction, which can't be automated through It would be good to put whatever new description (based loosely on the |
|
Personally, I'm in favor of adding a new exercise even if it contradicts @N-Parsons what do you think of such approach to the problems likes these? |
|
@m-a-ge What should I do know? |
|
@vaibhavsingh97 we need more tests to be added |
|
@m-a-ge, sounds good to me. |
|
@vaibhavsingh97 are you still working on this? |
|
Yes, I forgot now will update PR |
|
This issue has been automatically marked as |
Fixes: #745