Code the Hangman Game in Java

preview_player
Показать описание
In this video, I will teach you how to make a hangman game in java.
Thanks for watching the video and please leave a like and subscribe!

*****************************************
The link to the dictionary text file:

Download the text version for English
unzip it and the text file is inside the folder

*****************************************
The Function Code:
public static void drawHangman(int l) {
if(l == 6) {
}
else if(l == 5) {
}
else if(l == 4) {
}
else if(l == 3) {
}
else if(l == 2) {
}
else if(l == 1) {
}
else{
}
}
Рекомендации по теме
Комментарии
Автор

hey great video, just wanted to know if there is a way I can let users get the whole word and still have the commands you wrote for checking valid input. thanks !

safwanmalik
Автор

Exactly what I was looking for! But in my case I just want to code the program so that I can choose the word myself.
However you got my subscription.

MusicGenerationJ
Автор

this is really helpful for beginners like me ! thank you for sharing !!!

nikolcenalevski
Автор

Thank you so much! I learned a lot from your video. I subscribed to your channel to get updated for your new videos :)

_keita
Автор

Ty bro, u helped me for my application hehe

kabashii
Автор

There are bunch of things to improve in your code, Tim. From the code-quality standpoint

Автор

Amazing video learned a lot. Quick Question what would be the best method to test short programs like hangman Junit or TDD?

MadaraUchihaa
Автор

great video man but i am having trouble pasting in my dictionary into the SRC.... nothing happens when I right click the src and press paste

it may be because i am using IntelliJ and not eclipse. Any thoughts or advice?

holasanja
Автор

Hey, could you suggest how I could add a warning counter so that if the user types a number or more than 1 letter they get a warning and 3 warnings would result in a life lost

steve.d
Автор

String letter = input.next();
//checks for valid input
while(letter.length() != 1 || {
System.out.println("Error Input - Try Again");
letter = input.next();

this while loop doesnt work properly for me, it always says an error if i put in 1 character and if i put 2+ the code would just break.

AlawiDenGhosty
Автор

hello! great video but if i wanted to know the whole word at the end how would i do that?

sincerelyliza
Автор

omg your the best very nice video ithelped me understand at last how this work, now i have a request can you do one with fxml and methods accepting parameters?

Defense
Автор

hey I know you did this video over a year ago but while(letter.length() ! = 1 || { this line of code is saying int cannot be converted to Boolean, wondering if you can help me out thanks

olliebb
Автор

something wrong with the dictionary link it just opens and closes nothing downloads

rtester
Автор

How could i do this if i want a string of self typed words?

lassemadsen