hangman

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
Muttley
Posts: 39
Joined: October 19th, 2012, 6:00 am

hangman

Post by Muttley » November 2nd, 2012, 3:33 pm

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.
Attachments
hangman game.rar
(692.41 KiB) Downloaded 305 times

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: hangman

Post by thetoddfather » November 2nd, 2012, 4:35 pm

Well done! You should add a reset button to reset the game to play again.

adabo
Posts: 154
Joined: October 27th, 2012, 3:28 am
Location: Houston, Texas

Re: hangman

Post by adabo » November 2nd, 2012, 4:59 pm

+1 for reset button :) Good work Muttley. Without any tutorials? Wow. I'm impressed.

I have no idea how to add one yet either.

Muttley
Posts: 39
Joined: October 19th, 2012, 6:00 am

Re: hangman

Post by Muttley » November 2nd, 2012, 5:10 pm

@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. :)

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: hangman

Post by LuX » November 2nd, 2012, 10:12 pm

Nice work.
ʕ •ᴥ•ʔ

Sumit
Posts: 40
Joined: July 29th, 2012, 11:32 am

Re: hangman

Post by Sumit » November 3rd, 2012, 5:56 am

Nice Work Muttley.
Sumit

Muttley
Posts: 39
Joined: October 19th, 2012, 6:00 am

Re: hangman

Post by Muttley » November 4th, 2012, 3:44 pm

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
Attachments
Hangman game v2.0.rar
(693.61 KiB) Downloaded 275 times

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: hangman

Post by thetoddfather » November 4th, 2012, 8:52 pm

Nice improvements!

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

User avatar
thetoddfather
Posts: 338
Joined: October 1st, 2012, 9:53 pm
Location: Canada

Re: hangman

Post by thetoddfather » November 4th, 2012, 8:53 pm

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

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: hangman

Post by chili » November 8th, 2012, 1:18 pm

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.
Chili

Post Reply