This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Hangman

Return to Hangman

CooliMCCooliMC

2014/4/19

Nice game
A new version of this scenario was uploaded on Mon Apr 21 15:42:53 UTC 2014
Entity1037Entity1037

2014/4/21

These words are unfair...
PointifixPointifix

2014/4/21

oh you are damn right ;D even much more complicated as a german speaker. you always use letters that are often used in german words^^
Entity1037Entity1037

2014/4/21

Words: Growth Phlegm Syzygy Randomize Polysyllabic Cellophane Quaternary Evaporate Scenario Cryptograph Dragonslayer Billfold Clergyman Palindrome Frozen Pompous Butterfly There's probably more words I haven't found yet.
erdelferdelf

2014/4/21

yeah these words are pretty hard but nice game maybe include more common words, here are a few links to filter them out if u want http://www.espressoenglish.net/100-common-nouns-in-english/ http://esl.about.com/library/vocabulary/bl1000_list_noun1.htm http://www.linguasorb.com/en/english/most-common-nouns
A new version of this scenario was uploaded on Tue Apr 22 02:45:44 UTC 2014
danpostdanpost

2014/4/22

A bunch more words have been added (mostly words associated with coding). Also did some simplifying of code.
PointifixPointifix

2014/4/22

Entity had a boring afternoon? ;)
PointifixPointifix

2014/4/22

lol i lost with the word hangman ;DDD
danpostdanpost

2014/4/22

@Pointifix, that is allowed. Is 'hangman' really a word or is it the name of a game? I just though it would be cute to add it because it was right there on the upper button (in front of your face, sorta speak).
danpostdanpost

2014/4/22

@Pointifix, I found it was a valid word. It refers to the person who performs the hanging -- the executioner.
PointifixPointifix

2014/4/22

k ;D
davmacdavmac

2014/4/22

I like the way you can see the source code from within the scenario itself!
Entity1037Entity1037

2014/4/22

REALLY??? Xylophone?! So unfair! And the heck is "Rustic"?? I mean come on!... Cellophane? -_- Question: do you allow sentences, or is it just words?
danpostdanpost

2014/4/22

Rustic: crude, unrefined, rural Would you rather I used 'citrus' (same letters)? Cellophane -- also known as 'plastic wrap' Right now it is just words.
A new version of this scenario was uploaded on Wed Apr 23 03:12:41 UTC 2014
danpostdanpost

2014/4/23

Slight clarification in the documentation.
PeachPeach

2014/4/23

is the words class an actor class
PeachPeach

2014/4/23

do you have a "letter" class as well?
danpostdanpost

2014/4/23

The Words class does not extend Actor; I did not specify, so it automatically extends Object. The Letter class is included at the end of the Hangman class.
PeachPeach

2014/4/24

so you have one world class, Hangman, and what actor classes?
danpostdanpost

2014/4/24

@Peach, actually I have two World subclasses: Hangman and TextFileViewer (to display the text files of the code). The only Actor subclass is the Letter class which I have as an inner class of Hangman and one Object subclass (the Words class). I used the Letter class only for the 26 Letter object that can be clicked on (the ones that turn gray after being chosen). The guessed letter (and the letter that appear in red after a lose) as well as the images used to show the drawing of the one who is being hanged are also Actor objects; but of no particular class (un-named Actor objects). I have a method in the Hangman class that is used to created and return an un-named actor object (getGenericActor).
PeachPeach

2014/4/29

sorry i don't really understand, so you don't have different classes for each body part of the hangman? eg. (right arm, right leg, head, etc)? instead, that is under the letter class?
danpostdanpost

2014/4/29

@Peach, I do not have separate classes for each body part; however, even though they are created from within the Letter class, they are not Letter actors. In fact. they are not of any particular type of Actor (they are un-named, or generic). I felt no need to place them in separate classes as once they are drawn, their type is un-important (no collision checking or anything would need to know what class they are) and there is no further action for them to take (no act, fields or methods). Their only purpose is for image display and there was only a need for Actor class methods to accomplish that. Look at the 'getGenericActor' method, which is used to return a new generic Actor object. Also, look at some of my other recent uploads and view the codes within them for more examples of creating these un-named Actor object; as well as some that are named, but coded within another class (inner classes).
PeachPeach

2014/4/30

where do you declare the variable "word"?
PeachPeach

2014/4/30

is the word class is an actor class
PeachPeach

2014/4/30

i don't understand this part of the code: static String[] words = {< WordsOmiited>} static java.util.Random r and = new java.util.Random(System.currentTimeMillis());
danpostdanpost

2014/4/30

@Peach, they are just field declaration statements for the array of words and the random number generator which is used to produce a random index for the word in the array to use in the puzzle. Getting the current time produces a 'random' seed for the random number generator. Check the java.util.Random API documentation for additional information on this type of Object. Having these field as 'static' causes them to be set prior to any Objects being created from the class (actually, they are created during compilation; and resetting does not alter them); and as these two fields will not change throughout the running of the scenario, they should probably be made 'final' as well.
PeachPeach

2014/5/1

oh ok another question, where do you declare the variable "word"? do you have a word class?
danpostdanpost

2014/5/1

The 'word' field is declared third from last before the Hangman class constructor.
PeachPeach

2014/5/5

what's an objects class
danpostdanpost

2014/5/5

@Peach, please refer to the following webpage: http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html