Class Character

java.lang.Object
com.bdtripp.hauntedhouse.model.Character

public class Character extends Object
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 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

      public String getName()
      Returns the name of the character
      Returns:
      the name
    • getInitialDialog

      public String getInitialDialog()
      Returns the initial dialog that the character speaks
      Returns:
      the initial dialog
    • getAcceptanceDialog

      public String getAcceptanceDialog()
      Returns the dialog that the character speaks upon accepting an item
      Returns:
      the acceptance dialog
    • getItemSought

      public Item getItemSought()
      Returns the item that the character is seeking
      Returns:
      the item
    • getItemForReward

      public Item getItemForReward()
      Returns the item as a reward
      Returns:
      the item