java.lang.Object
com.jdwsoftware.wfh.model.GameType
com.jdwsoftware.wfh.model.NumberGame
- public class NumberGame
- extends GameType
Title: Woody's Fishing Hole
Description: Educational Fishing Game
Copyright: Copyright (C) 2003 JDW Software, LLC
Company: JDW Software, LLC
- Version:
- $Revision: 1.6 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
private static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
VERSION
private static final java.lang.String VERSION
- See Also:
- Constant Field Values
NUMBERS
private static final java.lang.String[] NUMBERS
_images
private java.util.Hashtable _images
_question
private java.lang.String _question
r
private static java.util.Random r
NumberGame
public NumberGame(javax.swing.JComponent caller)
newQuestion
public void newQuestion()
- Description copied from class:
GameType
- Call new question to generate a new question and answer
- Specified by:
newQuestion in class GameType
getQuestion
public java.awt.Image getQuestion()
- Description copied from class:
GameType
- Get the question image this is to be displayed on the
passed component
- Specified by:
getQuestion in class GameType
getAnswer
public java.lang.String getAnswer()
- Description copied from class:
GameType
- Get the string representation of the answer to getQuestion()
- Specified by:
getAnswer in class GameType
getValidAnswers
public java.lang.String[] getValidAnswers()
- Description copied from class:
GameType
- Get a set of all possible answers. This is a set of string
answers.
- Specified by:
getValidAnswers in class GameType
getAnswer
public java.awt.Image getAnswer(java.lang.String s)
- Description copied from class:
GameType
- Given an answer string, get the corresponding image to put on
the fish.
- Specified by:
getAnswer in class GameType