Skip to content

added hangman ascii graphics - #96

Merged
prateekiiest merged 4 commits into
prateekiiest:masterfrom
imVivekGupta:hangman
Dec 19, 2017
Merged

added hangman ascii graphics#96
prateekiiest merged 4 commits into
prateekiiest:masterfrom
imVivekGupta:hangman

Conversation

@imVivekGupta

Copy link
Copy Markdown
Contributor

ISSUE NUMBER

#95

SHORT DESCRIPTION

Added the ascii figures

TESTING

Play the game by running python code.py inside Hangman directory.

@imVivekGupta

Copy link
Copy Markdown
Contributor Author

Codeclimate issue is number of lines in a method. Creating the figures would require some lines unless I use \n to draw the figures on a single line.

Comment thread Hangman/code.py
'''_____\n|/\n| O\n| /|\\\n| / \\\n|''',
'''_____\n|/\n| O\n| /|\\\n| /\n|''',
'''_____\n|/\n| O\n| /|\\\n|\n|''',
'''_____\n|/\n| O\n| /|\n|\n|''',

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I didn't understand this part,

could you explain what this part does?

@imVivekGupta imVivekGupta Dec 13, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is a list of hangman figures: see this commit - e40863b

Codeclimate marked this as an issue because the function length was 45 lines (<=25 lines guideline for good code). So, I modified to make it within limit.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

sure got it

@prateekiiest prateekiiest left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I guess its only declaration of the functions.
It does not show anything on output.

Write something using them under main and give some output.

@imVivekGupta

Copy link
Copy Markdown
Contributor Author

I am using the function. Line 124: draw_hangman(num_guesses)
You have to play the game to see. The figures start appearing after first wrong guess.
image

@prateekiiest

Copy link
Copy Markdown
Owner

I guess you can give an output as a gif

@prateekiiest
prateekiiest removed the request for review from xdsarkar December 14, 2017 09:55
@prateekiiest

Copy link
Copy Markdown
Owner

any updates @imVivekGupta ?

@imVivekGupta

Copy link
Copy Markdown
Contributor Author

@prateekiiest I didn’t get you. In the game, whenever the player makes a wrong guess, a little portion of the hangman gets completed. How will a gif work in this case?

@prateekiiest

Copy link
Copy Markdown
Owner

Ok, I understand that. I am merging this now. I will see if I can work out with it.

Thanks for the contribution 🥇

@prateekiiest
prateekiiest merged commit d431963 into prateekiiest:master Dec 19, 2017
@imVivekGupta

Copy link
Copy Markdown
Contributor Author

Yes! I would be happy to work on your suggestions:)

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.

2 participants