Page 1 of 1

hangman

Posted: November 2nd, 2012, 3:33 pm
by Muttley
I tried to make this game from scratch without tutorials, just for practice. Its pretty simple, Im sure there is some bugs, but its not important. Anyways, the theme is animals, here is the list to test: cat, dog, fish, turtle, shark, monkey, bird and dolphin.

Everything i know is from Chili's lessons and the code could be a little messy. So, see what you guys think!

( Sorry my poor english, google translator isnt much accurate :lol: )

*I forgot, just type to play.

Re: hangman

Posted: November 2nd, 2012, 4:35 pm
by thetoddfather
Well done! You should add a reset button to reset the game to play again.

Re: hangman

Posted: November 2nd, 2012, 4:59 pm
by adabo
+1 for reset button :) Good work Muttley. Without any tutorials? Wow. I'm impressed.

I have no idea how to add one yet either.

Re: hangman

Posted: November 2nd, 2012, 5:10 pm
by Muttley
@thetoddfather I did it here now, but im too lazy to upload again :lol:

@adabo, yeah, I was challenging myself because simply following a tutorial would not help much, I wanted to figure out alone to learn more, it took me a few days.

Thank you for the feedback guys. :)

Re: hangman

Posted: November 2nd, 2012, 10:12 pm
by LuX
Nice work.

Re: hangman

Posted: November 3rd, 2012, 5:56 am
by Sumit
Nice Work Muttley.

Re: hangman

Posted: November 4th, 2012, 3:44 pm
by Muttley
I decided to improve my project before start another, I think the game is complete now!

Here is the list with the changes:

- Added Reset function.
- Added a display which shows the chars it were typed.
- Now you can only use chars between 'a' and 'z'.
- You can't type the same letter twice.
- Fixed a bug which sometimes the wrong letter typed after a right letter wasn't recognize as a mistake.
- Fixed some memory leaks.
- Code improved, much more cleaner.

Yeah, now I can move to another project! :D

Re: hangman

Posted: November 4th, 2012, 8:52 pm
by thetoddfather
Nice improvements!

This is really good! Very clean. Nice work man.

Re: hangman

Posted: November 4th, 2012, 8:53 pm
by thetoddfather
Go try my game, I need lots of people to try it so I can be sure it works!

http://www.planetchili.net/forum/viewto ... 6&start=50

Re: hangman

Posted: November 8th, 2012, 1:18 pm
by chili
Looks really nice! Good job muttley.

One comment: you create a class to handle your hangman. It's done fairly well, but one thing you should consider is handling the allocation of all resources in the constructor of the hangman class rather than in the game constructor.