Questions tagged [hangman]

A common word-guessing game, usually involving a pictorial representation of a stick figure being hanged, progressively rendered for each wrong guess

Filter by
Sorted by
Tagged with
40
votes
1answer
3k views

The right way to hang a man

Problem: I have seen a few questions around hangman. Usually this is done in a very hackish way, which usually can not be generalized any further. My thought or question is about the creation of the ...
19
votes
2answers
2k views

Hangman on the C++ommand line

I'm wondering if my code is just a tad too long to post here, but if the only consequence seems to be getting high-level reviews, then that's perfectly fine. This is my implementation of Hangman in C+...
18
votes
2answers
2k views

Simple game of Hangman in Python

I'm starting out with learning how to program in Python and created a Hangman game. I think there is a lot of unnecessary code but I am not sure how to improve it. I wanted to avoid using global ...
17
votes
4answers
3k views

Beginners Python Hangman Code

I just started learning about Python at school and decided to start this little project with the basic knowledge I have. Most of the code is pretty lengthy and I know there are probably more efficient ...
15
votes
3answers
2k views

Hangman Game with C++

After finishing my C++ course, I decided to make a hangman game. (without the drawing part) I was wondering how the code could be improved. Header File: ...
14
votes
4answers
3k views

Hangman in Python 3

I started learning Python a couple of weeks ago and decided to make a game of Hangman. Some of the features: Take in player name Allow them to pick and change difficulty level Play again when the ...
14
votes
1answer
2k views

Hangman game logicistics and cleanliness

I recently started working on my code's cleanliness/logistics and would appreciate it if you could give me some tips on how to improve certain things. Here's a simple console Hangman game I've made: ...
12
votes
4answers
4k views

Hangman game in Java - second try

Please look over my new object-oriented version of my Hangman game I posted here about two weeks ago. I know I should work more on commenting and be clearer and more descriptive of the methods and ...
12
votes
3answers
2k views

Testing new C++11 features with Hangman

I wrote a Hangman game to try out some of the new features in C++11. I'm pretty new to C++, and I would like some good advice on how I can improve this code (in terms of conventions, bad/good ...
12
votes
5answers
900 views

Find all words that satisfy unknown letters (Hangman)

I have been working on a function which might be used to solve a word game like Hangman or "Wheel of Fortune". Basically, I wish to search from a very large ...
12
votes
4answers
84k views

Simple game of Hangman

On my quest to become a master programmer I have created a simple game of Hangman, and so I thought I would upload it here and see how it could be refined. One question I had was my use of exception ...
11
votes
2answers
9k views

C++ Hangman Game

I've been working in C++ for awhile now, but always like for others to look over my code as much as I can get them to. My main concerns are if I've made something overly complicated or if I've broken ...
10
votes
2answers
773 views

“Hangman” game follow-on

Last week I asked to review my "Guess a number" game in Java here I learned so much that I decided to try a little harder game and put into practice all the amazing feedback I received there. Would ...
10
votes
2answers
3k views

Hangman game with hard-coded word or phrase

I feel that this implementation can still be simplified. I've tried to keep variable scopes low and have used as much of the standard library as I could. It currently works with a hard-coded word or ...
10
votes
2answers
88k views

Very simple Hangman game

Does this code follow standard conventions, not redundant? How I can make it more comprehensible for other people? It's an exercise from the Java introductory book: Write a hangman game that ...
10
votes
1answer
664 views

Hangman learning AI

I have been learning AngularJS and have written my first app. It's a Hangman AI which learns words and guesses the solution based on the words it knows. Please look over my code and provide some ...
10
votes
1answer
2k views

Hangman game using Java 8

I’ve been getting used to Java and I’ve written a simple hangman game using event-driven programming in Java 8. Please let me know of any improvements regarding the readability and design of the ...
9
votes
2answers
292 views

Hangman in COBOL

Whenever I learn a new (or an old :)) programming language, I implement Hangman in it. This time it's with COBOL. ...
8
votes
5answers
4k views

First Hangman game

This is my first ever program created after reading a book on Python. Do you have any suggestions for me? Anything that are considered bad habits that I should correct for my new project? ...
8
votes
3answers
3k views

Simple Hangman game in Java

I'm teaching myself Java and I had some basic questions on how well I am writing my code for readability. I feel like sometimes I'm just writing code that works, and I'm not that proud of myself when ...
8
votes
4answers
729 views

My Hangman game created using PyQt5 and Python 3.5

This is my Hangman game that I created using PyQt5 and Python 3.5 on my Windows 7 machine. What do you think? Is there anything you thing I could change/improve in terms of code or visually (font, ...
8
votes
3answers
2k views

2-player in a Python hangman game

This is a follow-up: Python Hangman Program I'm working on adding a few features to my hangman game, and I just implemented two-player gameplay, in the form of one player chooses the word to be ...
8
votes
1answer
476 views

HangPerson in Haskell

I created a HangPerson game in Haskell and I must admit it feels very imperative. How can I make it more "functional?" Are there more elegant ways of breaking up the task? The ...
8
votes
1answer
2k views

Simple Hangman game in C++

I am trying to create a simple Hangman game. The game has an edit mode for first run in which the user has to supply 6 unique words. The game starts by shuffling words, then for every turn, it selects ...
7
votes
2answers
11k views

Python Hangman program

To learn Python, I've been working through Learn Python the Hard Way, and to exercise my Python skills I wrote a little Python Hangman game (PyHangman - creative, right?): ...
7
votes
2answers
924 views

Hangman game, written after taking a Python course

I have recently finished a course on Python 3 and I really learned a lot, but every time I write a script, it is messy and I often feel like there must be shorter, more efficient ways to write and ...
7
votes
2answers
1k views

Console based Hangman in Java

I just created a Hangman app (same game mechanics mostly) using Java. I did this mainly to test my knowledge in OOP design/coding. I'd like to know your thoughts on my code The whole project is on ...
7
votes
1answer
936 views

Hangman in Swift

I am a Java programmer trying to learn the ways of Swift. I coded a Hangman game in Xcode. I was wondering what I could improve, specifically whether I used delegation correctly and if there is ...
7
votes
3answers
3k views

Hangman game in Java

I'm hoping someone can look over my code and tell me if there is anything I can improve. I am not very experienced with Java. I am hoping for some feedback as to avoid developing any bad habits which ...
7
votes
1answer
10k views

Hangman program in Java

Here's an implementation of Hangman using Java 6. I've split the code into 2 classes - a logic class & a gui class. Is it ok to have so many static member variables? Please let me know if there ...
7
votes
1answer
106 views

Hangman game, with the number of guesses depending on the word length

This is an interactive game between the computer and the player, where the computer chooses a word and the user has to guess the letters in that word. The computer provides certain number of guesses ...
7
votes
1answer
555 views

Implementation of Hangman in Java

Here's an implementation of Hangman that I've written that uses a basic GUI. As I am new to Java, please let me know of any improvements I can make to my coding style. Thanks for your help. ...
7
votes
1answer
74 views

The game Hangman made in Python 3 with a little bonus

This code is for the game Hangman, I added a little bonus in it for cheating/debugging reasons, I thought it's worth sharing since it's the biggest code I've created yet. Description: Classic game ...
7
votes
1answer
378 views

Hangman in stateless JavaScript

I just want some feedback to improve readability and structure for this implementation of Hangman. The goal was to write it in a purely functional way. However, coming from an imperative background, I ...
7
votes
1answer
637 views

Hangman mini-game on python

I'm a 16 year old who has picked up coding recently using the codecademy course on Python. I completed the last of the lessons yesterday and decided to start on a simple Hangman game. As this is my ...
6
votes
3answers
5k views

Simple Python hangman game

I've created a little hangman game. It's pretty simple, and not to exciting but I want to know if there's a way I could turn this little game into something more extravagant and more exciting. How can ...
6
votes
3answers
180 views

Hangman implementation for teaching a Python course

I am teaching a Python crash course and thought a Hangman rendition would be fruitful. I have an end product that I'll work towards with the hour that I have for the course and I was wondering what ...
6
votes
2answers
491 views

Hangman game code refactoring

I would like some help refactoring this code. This is to improve some of the nonfunctional attributes of the software to improve code readability reduce complexity to improve the maintainability of ...
6
votes
2answers
789 views

Hangman from a beginner

I'm trying to learn programming with python by myself and I've made a hangman game for exercise purposes. ...
6
votes
2answers
2k views

Beginner word-guessing game

The aim is to guess a four letter string. Each letter can be tried four times. If the letter cannot be guessed, we go to the next letter until the fourth letter is reached. I looked at my code and ...
6
votes
2answers
594 views

Improving Hangman game

I'd like to know how this program can be improved. Any comments or critiques are most welcome. ...
6
votes
3answers
4k views

Hangman in Python

I created this version of Hangman in Python 3. Does anyone have any tips for optimization or improvement? ...
6
votes
2answers
1k views

Command line Hangman game

I was wondering if you can give me advice / and your opinion on the following code. I'm aware there are a few things that it doesn't presently deal with that could be enhanced (I don't have time, this ...
6
votes
1answer
287 views

Hangman Python Game

I have recently been diving into Python. I have been making really small programs like this one and I am not confident in how practical I am writing Python. This is because I am not familiar with the ...
6
votes
2answers
3k views

Simple Hangman for Python

Assignment Criteria Create another version of the Hangman game, this time using Lists. The program should ask for the word to guess and the number of chances to be given. It should then ...
6
votes
2answers
529 views

Beginner Hangman in Python

I'm new to programming (just about 2 months), and have been trying to learn as much as I can as quickly as I can. I made a little Hangman game as a practice project this weekend. It doesn't have ...
6
votes
1answer
2k views

Hangman with ASCII

I have just made a game called Hangman. I have added some stuff which people don't normally use, like cheat-code/s, time.sleep(). How can I improve this, in both ...
6
votes
1answer
893 views

Small Haskell Hangman game

I've been learning Haskell, and a while ago I created this Hangman game. I've been working on using a library for terminal output, so no more hardcoded escape codes, but in the meantime I'd like some ...
6
votes
1answer
129 views

Simple CLI Python Hangman game

Preamble: I am very new to Python, and outside of Googling functions and a former work colleague telling me why I'm wrong, I have no formal training and haven't taken any "Learn Python" courses. I ...
5
votes
6answers
1k views

Hangman game in Python

While I'm not new to Python, this is my first 'bigger' Python program I created, also my first game in Python. ...