Package com.bdtripp.hauntedhouse.model
Class Character
java.lang.Object
com.bdtripp.hauntedhouse.model.Character
Represents a non-player character.
A Character can speak with the player and may request a specific item in exchange for offering a
reward item.
- Author:
- Brian Tripp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the dialog that the character speaks upon accepting an itemReturns the initial dialog that the character speaksReturns the item as a rewardReturns the item that the character is seekinggetName()Returns the name of the character
-
Constructor Details
-
Character
public Character(String name, String initialDialog, String acceptanceDialog, Item itemSought, Item itemForReward) Create a character with a name, dialog, item they are seeking, and item they give as a reward.- Parameters:
name- the name of the character.initialDialog- the initial dialog that the character speaks.acceptanceDialog- the dialog that the character speaks upon accepting an item.itemSought- the item that the character is seeking.itemForReward- the item that the character rewards the player with.
-
-
Method Details
-
getName
Returns the name of the character- Returns:
- the name
-
getInitialDialog
Returns the initial dialog that the character speaks- Returns:
- the initial dialog
-
getAcceptanceDialog
Returns the dialog that the character speaks upon accepting an item- Returns:
- the acceptance dialog
-
getItemSought
Returns the item that the character is seeking- Returns:
- the item
-
getItemForReward
Returns the item as a reward- Returns:
- the item
-