Need help to make A Hangman

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Need help54321
    New Member
    • Jun 2007
    • 30

    Need help to make A Hangman

    Ok hes the thing u no public class thats how i gotta make it in JCreator and i dont even no where to start if anyone could give me some pointer or make the code and i use bits and piece That would really help that would be Great Thanks!!
    ps its in JCreator and i a real new at this so if you do make it with code try and make it easy like only 1-3 hangman words so a shorter game lol and easy code if that makes sence lol like the Words Keyboard ,Mouse ,and i dono speaker or something
  • blazedaces
    Contributor
    • May 2007
    • 284

    #2
    Originally posted by Need help54321
    Ok hes the thing u no public class thats how i gotta make it in JCreator and i dont even no where to start if anyone could give me some pointer or make the code and i use bits and piece That would really help that would be Great Thanks!!
    ps its in JCreator and i a real new at this so if you do make it with code try and make it easy like only 1-3 hangman words so a shorter game lol and easy code if that makes sence lol like the Words Keyboard ,Mouse ,and i dono speaker or something
    Please find and read the posting guidelines. We're not going to do your homework for you. If you make a valid attempt at this problem and then have problems with specific parts in the code or are having errors you don't understand then we will be glad to help you.

    As for pointers, I don't even know where to start, there's a lot more that goes into the hangman game then just words and letters.

    Good luck,
    -blazed

    Comment

    • Need help54321
      New Member
      • Jun 2007
      • 30

      #3
      Originally posted by blazedaces
      Please find and read the posting guidelines. We're not going to do your homework for you. If you make a valid attempt at this problem and then have problems with specific parts in the code or are having errors you don't understand then we will be glad to help you.

      As for pointers, I don't even know where to start, there's a lot more that goes into the hangman game then just words and letters.

      Good luck,
      -blazed
      Srry Man i Didnt no Im new at this hole java thing thanks

      Comment

      • blazedaces
        Contributor
        • May 2007
        • 284

        #4
        Originally posted by Need help54321
        Srry Man i Didnt no Im new at this hole java thing thanks
        P.S. I also don't think it's quite understandable what you need. Do you want a hangman game that just prints on the screen something like this:
        Code:
        _ _ _ _                               // Computer Output
        Please guess a letter:      // Computer Output
        r                                     // User Input
        Sorry, that's not correct,   // Computer Input
        you have only 9 chances left.   // Computer Input
        Please guess a letter:      // Computer Output
        OR do you want a pop up visual screen with an actual hangman that changes every time along with big letters and an updating painted screen every time a letter is correct or something (sounds more challenging then the actual game concept).

        I don't know.

        So maybe decide on exactly what you want first before you try and make it/ask someone for help on it?

        Good luck,
        -blazed

        Comment

        • Need help54321
          New Member
          • Jun 2007
          • 30

          #5
          Originally posted by blazedaces
          P.S. I also don't think it's quite understandable what you need. Do you want a hangman game that just prints on the screen something like this:
          Code:
          _ _ _ _                               // Computer Output
          Please guess a letter:      // Computer Output
          r                                     // User Input
          Sorry, that's not correct,   // Computer Input
          you have only 9 chances left.   // Computer Input
          Please guess a letter:      // Computer Output
          OR do you want a pop up visual screen with an actual hangman that changes every time along with big letters and an updating painted screen every time a letter is correct or something (sounds more challenging then the actual game concept).

          I don't know.

          So maybe decide on exactly what you want first before you try and make it/ask someone for help on it?

          Good luck,
          -blazed

          yeh But i need to start like with the Imports then public class hangman then Public Static void main(String args[])....yea so like u will have say 8 guess so user guess A and the word was Apple it would go "A----" then if they guess E it would go "A---E" but if they guessed H It would say srry That is Incorrect Please guess agine does that make sence?

          Comment

          • blazedaces
            Contributor
            • May 2007
            • 284

            #6
            Originally posted by Need help54321
            yeh But i need to start like with the Imports then public class hangman then Public Static void main(String args[])....yea so like u will have say 8 guess so user guess A and the word was Apple it would go "A----" then if they guess E it would go "A---E" but if they guessed H It would say srry That is Incorrect Please guess agine does that make sence?
            Alright, well you basically know what you want to do... so how about instead of tackling the syntax (the import stuff and static void bla bla) specifics, try just writing the logic/psuedocode.

            Like start by thinking, ok, how do I choose what word pops up? Is it always the same first one? Is it random? Let's say it's random, ok first few steps in psuedocode would say:

            Store words word1, word2, word3 in a set of some sort.
            Pick a random number 1-3
            Print these: "-" for the length of whatever numbered word we chose
            Print "Please guess a letter"
            ... Do you get it?

            Try to write all the psuedocode that should be written down, if you have difficulty with a specific part, write down again, what do you want it to do as much as possible. Then, instead of telling you what to do, I'll guide you to examples, or tell you to search for specific things or give you links to java classes and what to import and whatnot.

            I know that coding is something hard to do for the first time, but the challenge is mostly the logic, the HOW can this be done logically? Then syntax specifics you either learn over time or you look it up, it's all in books and on the internet. With so many programming languages each better/needed in different situations, you have to adjust yourself accordingly.

            Good luck,
            blazed

            Comment

            • Need help54321
              New Member
              • Jun 2007
              • 30

              #7
              lol This is so confusing i think im gonna make it one have like 2 words but not ramdom just one after the other but im so lost lol what is that code called like applet or i dont even no lol that might not even make sence like what kind of code is public class

              Comment

              • Need help54321
                New Member
                • Jun 2007
                • 30

                #8
                Yo im thinking about making a Maze instead lol just use ur mouse to get through it or something u think that would be easyer cause hangman is to complex for me lol

                Comment

                • DeMan
                  Top Contributor
                  • Nov 2006
                  • 1799

                  #9
                  I don't think a maze will be any easier (particularly a mouse oriented one)

                  Comment

                  • Need help54321
                    New Member
                    • Jun 2007
                    • 30

                    #10
                    Originally posted by DeMan
                    I don't think a maze will be any easier (particularly a mouse oriented one)

                    lol u got any ideas how to do it?like should i get a image of a maze off the internet?

                    Comment

                    • Need help54321
                      New Member
                      • Jun 2007
                      • 30

                      #11
                      Originally posted by Need help54321
                      lol u got any ideas how to do it?like should i get a image of a maze off the internet?
                      o what about a arrow key? i dono i got this project to make a game and im trying to think of a simple one that i can make

                      Comment

                      • DeMan
                        Top Contributor
                        • Nov 2006
                        • 1799

                        #12
                        I think the Hangman example is simpler and we should start there....

                        One approach would be to first make a 'boring' version that always gives the same word.
                        Once you have refined this to work nicely we can worry about adding more words.

                        I think if we are going to help you, it is important for us to understand how much Java do you know. Have you written anything in java before (say a simple "Hello World" even?)

                        If you can isolate where your dificulty lies in the problem, we can work on that difficulty.
                        Reiterating what blazedaces said:
                        The posting guidelines expressly forbid anyone from posting complete code, so we will have to work through the problem to help YOU to solve it, rather than give you a completed solution.

                        If the entire problem is confusing for you, the first step (again as pointed out by blazedaces) is to simplify the problem into smaller steps. Even if you don't know exactly how you will implement the smaller steps, it at least gives you an idea of simpler tasks you need to achieve

                        Comment

                        • Need help54321
                          New Member
                          • Jun 2007
                          • 30

                          #13
                          Originally posted by DeMan
                          I think the Hangman example is simpler and we should start there....

                          One approach would be to first make a 'boring' version that always gives the same word.
                          Once you have refined this to work nicely we can worry about adding more words.

                          I think if we are going to help you, it is important for us to understand how much Java do you know. Have you written anything in java before (say a simple "Hello World" even?)

                          If you can isolate where your dificulty lies in the problem, we can work on that difficulty.
                          Reiterating what blazedaces said:
                          The posting guidelines expressly forbid anyone from posting complete code, so we will have to work through the problem to help YOU to solve it, rather than give you a completed solution.

                          If the entire problem is confusing for you, the first step (again as pointed out by blazedaces) is to simplify the problem into smaller steps. Even if you don't know exactly how you will implement the smaller steps, it at least gives you an idea of simpler tasks you need to achieve
                          \


                          Alrite sounds good yea i have done a helloworld and other "easy "programs like some if statements....b ut for this hangman thing i dont no wheer to start like should i use String or i dont really no lol
                          like Public class HangMan
                          {
                          public startic void main(String args[])
                          {
                          String.... lol i dont no
                          }


                          }
                          }

                          Comment

                          • nomad
                            Recognized Expert Contributor
                            • Mar 2007
                            • 664

                            #14
                            Originally posted by Need help54321
                            \


                            Alrite sounds good yea i have done a helloworld and other "easy "programs like some if statements....b ut for this hangman thing i dont no wheer to start like should i use String or i dont really no lol
                            like Public class HangMan
                            {
                            public startic void main(String args[])
                            {
                            String.... lol i dont no
                            }


                            }
                            }
                            I'm a beginner myself and I just might do this one as well.
                            Here are some things to think about
                            1. set up your objects. 26 right
                            2. next you need to decide how you are going to catch the info from the user.
                            input or click a button for the letters (I like that one) requires listeners
                            3. next do you want to have a ramdom words chosen static, or can someone type one in.
                            4. how are you going to test it. use a if statement, switch with break...for loop
                            5. last how are you going to draw the hangman ie will need to repaint each event.
                            6. do you want to use an array
                            I'm sure there are more thing than this but its a good start.

                            nomad

                            Comment

                            • Need help54321
                              New Member
                              • Jun 2007
                              • 30

                              #15
                              Originally posted by nomad
                              I'm a beginner myself and I just might do this one as well.
                              Here are some things to think about
                              1. set up your objects. 26 right
                              2. next you need to decide how you are going to catch the info from the user.
                              input or click a button for the letters (I like that one) requires listeners
                              3. next do you want to have a ramdom words chosen static, or can someone type one in.
                              4. how are you going to test it. use a if statement, switch with break...for loop
                              5. last how are you going to draw the hangman ie will need to repaint each event.
                              6. do you want to use an array
                              I'm sure there are more thing than this but its a good start.

                              nomad


                              Ok Will for The hang man i idea i was just going to go something like _ _ _ _ _ ok and if u miss a letter a message will pop up and say sory that is incorrect u have 6 guess left then that avoids the hole picture of the hangman and keeps it a little less complex

                              Comment

                              Working...