38 Topics

Member Avatar for
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for C! It uses a words file, on the bottom of this post you will see a small example of a few words. You can …

Member Avatar for Anish_4
0
4K
Member Avatar for noor.ulhuda.372

hi.i am new to c++.i need to make hangman game for university project.could some on tell me what is the problem with this part of the code?thanks in advance #include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> #include <string> #include <windows.h> using namespace std; int main() { //variable declaration string …

Member Avatar for StuXYZ
0
192
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for Java! It uses a words file, on the bottom of this post you will see a small example of a few words. The source …

Member Avatar for JamesCherrill
2
4K
Member Avatar for infiniteloop56

Hi, I have a quick question. I am making a hang man game for project (I am at university as a computer science major), I have completed most of the game but have run into one small issue which has been given me a big problem. Right now I am …

Member Avatar for JamesCherrill
0
375
Member Avatar for xTurK

I have to complete this programming homework which consists of building a hangman game. However, the problem is: I do not know how to make it so that, when you guess a correct letter, it reveals that letter in the hidden word while still keeping the other parts of the …

Member Avatar for xTurK
0
317
Member Avatar for smellon

**I need urgent help with a hangman game it needs to be really basic so i can understand but it needs to include an array and an onscreen keyboard please please please help!

Member Avatar for KenSquare
0
212
Member Avatar for dendenny01

I am a beginner in java does not know much about it. But to practise it I have tried to simulate the popular game Hangman using simple methods.Please Guide me with the code In this program the words are given by the user and then they are converted in to …

Member Avatar for JamesCherrill
0
317
Member Avatar for bobrown101

Hey guys, I'm making a hangman project just for fun, and i was wondering if you could help me. * I have 5 classes * class 1- main (basically controlls everything except recognizing where the letters are located in the word and printing the hangman picture) * class 2- char_array …

Member Avatar for somjit{}
0
373
Member Avatar for thewayoftheduck

import java.util.Scanner; import java.util.Random; public class HangmanGame2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); final String[] WordList = { "porcupine", "flamingo", "sasquatch", "poseidon", "minnie mouse", "mickey mouse", "galileo" }; String ChosenWord = WordList[(int)Math.random()*WordList.length]; StringBuffer display = new StringBuffer(ChosenWord.length()); for (int i = 0; i < …

Member Avatar for IIM
0
311
Member Avatar for RaJsHaH.23

[import java.util.Scanner; import java.util.Random; public class HangmanMy { public static void main (String[] args){ System.out.println("Welcome to the game Hangman :)/>"); Scanner input = new Scanner(System.in); boolean done = false; String guess; String guesses = ""; char letter; int wrongGuess = 0; StringBuffer dashes; System.out.println("Choose a category -> places / games …

Member Avatar for corby
0
241
Member Avatar for TimBob12

I am fairly new to Pascal and I have been attempting to write a hangman game. I am aware that there are probably so many better ways to do this than I have done but I am having some problems where the exit variable is not met because the current …

Member Avatar for pritaeas
0
277
Member Avatar for darkrandomness

I'm new at this. But I'm taking a class and I need to turn this in by Friday. Please help me. I can only use strings and arrays. My hangman program needs five things: 1. user is prompted for a word that is ten letters or less, or else the …

Member Avatar for darkrandomness
0
248
Member Avatar for shawn.crego

I need help with my java code for the game hangman... we are using eclipse to write the game and using three main files to start...hangman.java hangmanlexicon.java and hangmancanvas.java. the first part of the assignment, is to create a ConsoleProgram for the game and this is what i have so …

Member Avatar for NormR1
0
242
Member Avatar for D33wakar

This is a simple hangman game that I wrote using my beginner python skills. Though this game is playable, there must be lots of things I must've been doing wrong or the methods I'm using here may be not so pythonic. So I want some suggestions on how to improve …

Member Avatar for TrustyTony
1
707
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for JavaScript! It uses a words file, on the bottom of this post you will see a small example of a few words. The source …

Member Avatar for rotten69
-1
2K
Member Avatar for coffecat

So i wanted to write a Hangman game and i started it, as im newbie programmer it took me several days to track all the bugs etc. Meanwhile i want to get good habits on designing and i read that Getters and Setters arent the best way to go for …

Member Avatar for Schol-R-LEA
0
312
Member Avatar for malsmit2014

I am not totaly sure my code for my revealLetter is correct....I can't quite convert letter string into an char array so i just left it as hiddenWord == letter in the code.... package program.p02; public class WordHider { private String hiddenWord; private String partiallyFoundWord; private int NUMBER_MISSES = 5; …

Member Avatar for stultuske
0
207
Member Avatar for malsmit2014

package program.p02; import java.io.*; import java.util.*; import java.lang.*; public class Dictionary { private String[] dictionary; private static final int NUMBER_OF_WORDS = 81452; private static String FILE_NAME = "dictionarycleaned.txt"; //no arg constructor??? public Dictionary() { Scanner fin = null; //open and test the stream try { fin = new Scanner(new File(FILE_NAME)); …

Member Avatar for JamesCherrill
0
186
Member Avatar for khuzdaar

I have my project due of hangman and it is worrying me lately. I need to make a hangman game. I have studied arrays, functions, loops, if else statements. That is about it. I haven't done 2d arrays. Will do it now, because someone told me it is not possible …

Member Avatar for khuzdaar
0
320
Member Avatar for Usmaan

I am using: underscoredWord = Regex.Replace(word, "[^" + correctLetters + "]", " _"); for my Hangman game. It basically chops the word up and replaces all the text with an underscore. This works fine if the guessing word is only "one word". So the word: "Building" will get converted to: …

Member Avatar for thines01
0
577
Member Avatar for uzii305

OK, i'm working on a hangman game in cmd prompt. I'm about halfway done, but i have hit a wall regarding the secret word, and the user guess. Now mind you, my professor has not taught the class any array manipulation methods or techniques for finding specific char in an …

Member Avatar for uzii305
0
373
Member Avatar for stannum

Hello, I joined about 5 minutes back. I need to complete my computer project, which is a hangman game in c++, by today. Based on what my teacher taught me, I have created a code that runs like this- [CODE]#include<iostream.h>//These are the only header files taught. #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<string.h> …

Member Avatar for WaltP
0
275
Member Avatar for techgeek420

Hey everyone! I am trying to writing a program that will play hangman. I have an understanding, on paper, of how to write the program... but I just cant fully convert it into java. I have started the program but I've gotten to a point where I'm stumped. Any help …

Member Avatar for NormR1
0
194
Member Avatar for superheroo

i want some help i have this progamm and i want to add points when a letter is found 10 points PLZ HELP ME! i also want to make it for two players Module Module1 Public zoes As Byte Sub Main () Dim un As String un = Console.ReadLine() Dim …

Member Avatar for KingGold171
0
378
Member Avatar for Mike Tyson

I am having trouble completing This hangman project. It mmost be done using model view controller pattern. Here is what i have so far //Header file declarations import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileInputStream; import java.io.IOException; import java.util.Scanner; //Class declaration class HangmanModel extends JFrame implements ActionListener { …

Member Avatar for stultuske
0
256
Member Avatar for SnarkysXe

The error is: class, interface, or enum expected. I've never seen or heard of this error before surprisingly, and I've written all of my code the same way, so I'm not too sure what's wrong with. I've put red arrows around the lines in question. Thanks in advance! [CODE]/* Hangman …

Member Avatar for NormR1
0
244
Member Avatar for swoshromp

What my problem is I don't know how do I set it up so that when the entire word has been guessed I can stop the game and tell the user they won or lost. I tried adding in another if statement after maxTries--; where it says if (maxTries == …

Member Avatar for JeffGrigg
0
249
Member Avatar for laitingfei

So I've made a game called HangMan, but it still needs the finishing touches. Anyways, a bit about the game... A JFrame shows 26 buttons for the letters of the alphabet and a whole set of other buttons to make up empty slots (they eventually will be filled in everytime …

Member Avatar for Taywin
0
282
Member Avatar for laitingfei

I have a Computer Science project due Monday. We have to make a game and use GUI in order to ensure ourselves a good score. I decided to make Hang Man. The class reads in a txt file of common SAT words (I'm a sophomore in high school, so I …

Member Avatar for rebecca94
0
2K
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for PHP! It uses a words file, on the bottom of this post you will see a small example of a few words. The source …

Member Avatar for Nick Evan
0
2K

The End.