Getting REALLY frustrated making this hangman-type game
Posted: Sat Apr 30, 2011 5:28 pm
So I started learning PHP a few days ago and I sort of dived right in trying to make things, this was my first program (a simple BMI calculator)
http://pastebin.com/SHfA4pt5
Okay but now I wanted to make hangman, and I'm just...so lost, like, I don't even know how to go about it. Here is the code I have so far (some of it commented out because it was just "ideas" I had). Here is what I have so far:
http://pastebin.com/FyQPmR8U
So can somebody give me some direction? Is there anything I wrote that is REALLY dumb and unnecessary? Basically I'm trying to find a way to:
- log the guesses (how can I do this if I don't have an array, or nothing to put the values in...do I need to duplicate anything?)
- check to see if a guess has already been made
- replace the underscores with the letter corresponding to that position.
and hell I don't even know what else, just trying to get it to work
http://pastebin.com/SHfA4pt5
Okay but now I wanted to make hangman, and I'm just...so lost, like, I don't even know how to go about it. Here is the code I have so far (some of it commented out because it was just "ideas" I had). Here is what I have so far:
http://pastebin.com/FyQPmR8U
So can somebody give me some direction? Is there anything I wrote that is REALLY dumb and unnecessary? Basically I'm trying to find a way to:
- log the guesses (how can I do this if I don't have an array, or nothing to put the values in...do I need to duplicate anything?)
- check to see if a guess has already been made
- replace the underscores with the letter corresponding to that position.
and hell I don't even know what else, just trying to get it to work