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

Report as inappropriate.

danpost
danpost presents ...

2014/4/19

Hangman

A standard hangman.

Use keys or mouse to select letters.
Click on a button at top-right to view the code of that class.
Use 'up' and 'down' arrow keys or drag the handle of the scrollbar to scroll the text.
Use 'x' or 'escape' key to exit source viewing.

10248 views / 33 in the last 7 days

13 votes | 0 in the last 7 days

Tags: mouse game keyboard danpost source-text hangman

This scenario is a member of: Games by danpost


Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2020-10-28 19:52:15 UTC
A new version of this scenario was uploaded on 2020-10-28 19:52:38 UTC
A new version of this scenario was uploaded on 2020-10-28 19:57:06 UTC
A new version of this scenario was uploaded on 2020-10-28 20:01:38 UTC
Roshan123Roshan123

2021/10/7

Would u tell me what r the words omitted in Words class
Roshan123Roshan123

2021/10/7

And what is the difference between java. util. Random and Greenfoot. getRandomNumber()?
danpostdanpost

2021/10/7

The words omitted are the Hangman puzzle answers (not given for obvious reasons). Little difference between the two randoms. In fact, the method Greenfoot.getRandomNumber(int) uses java.util.Random in its implementation.
danpostdanpost

2021/10/7

As far as random, I used it here because I wanted to ensure a new random seed value each and every loading (greenfoot probably does it in a somewhat similar manner, but anyway ...).
Roshan123Roshan123

2021/10/7

I just asked the words to chea.... Whatever it may be, but the main thung is that how u got to know that Greenfoot.getRandomNubmer() is just a implementation of java.util.Random? Is their any api for all the methods of greenfoot(i mean how the methods are created and not the api which shows how to use it) If yes, plz share the link
danpostdanpost

2021/10/7

From source (comments are mine): ----------------- // importing class import java.util.Random; // creating Random object private static Random randomGenerator = new Random(); // using Random object public static int getRandomNumber(int limit) { return randomGenerator.nextInt(limit); }

See all comments

Want to leave a comment? You must first log in.

Who likes this?

alex90 ninjapuffin xWanna TotalBOSS01 Watchb Peach Zamoht davmac jogit666 Greenfootnoob Entity1037 CooliMC RUMMAKER