Index
All Classes and Interfaces|All Packages
A
- addCharacter(Character) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Adds a character to the room
- addItem(Item) - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Adds an item to the inventory
- addItem(Item) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Adds an item to the room
B
- BACK - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Return to the previous room.
- BATHROOM - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A bathroom.
- BILLIARD_ROOM - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A billiard room.
- buildWelcomeMessage() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Build the welcome message that displays when a new game is started.
C
- Character - Class in com.bdtripp.hauntedhouse.model
-
Represents a non-player character.
- Character(String, String, String, Item, Item) - Constructor for class com.bdtripp.hauntedhouse.model.Character
-
Create a character with a name, dialog, item they are seeking, and item they give as a reward.
- CHARGE - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Charge an item.
- CliRunner - Class in com.bdtripp.hauntedhouse.engine
-
Runs the game in a command-line environment.
- CliRunner() - Constructor for class com.bdtripp.hauntedhouse.engine.CliRunner
-
Initializes the parser and game engine for cli play.
- com.bdtripp.hauntedhouse - package com.bdtripp.hauntedhouse
- com.bdtripp.hauntedhouse.api - package com.bdtripp.hauntedhouse.api
- com.bdtripp.hauntedhouse.controller - package com.bdtripp.hauntedhouse.controller
- com.bdtripp.hauntedhouse.engine - package com.bdtripp.hauntedhouse.engine
- com.bdtripp.hauntedhouse.model - package com.bdtripp.hauntedhouse.model
- com.bdtripp.hauntedhouse.service - package com.bdtripp.hauntedhouse.service
- Command - Class in com.bdtripp.hauntedhouse.model
-
Represents a parsed player command.
- Command(CommandWord, String, String) - Constructor for class com.bdtripp.hauntedhouse.model.Command
-
Create a command with three words.
- CommandProcessor - Class in com.bdtripp.hauntedhouse.engine
-
Interprets player commands and applies their effects to the game world.
- CommandProcessor(World, GameEngine) - Constructor for class com.bdtripp.hauntedhouse.engine.CommandProcessor
-
Creates a CommandProcessor that operates on the given game world.
- CommandWord - Enum Class in com.bdtripp.hauntedhouse.model
-
An enumeration of all valid commands.
- createWorld() - Method in class com.bdtripp.hauntedhouse.engine.WorldBuilder
-
Create the game world.
D
- DEN - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A den.
- describeCharacters() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Produces a formatted list of characters in the room.
- describeCurrentRoom() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Gets a description about the room the player is currently in including the items and characters that it contains.
- describeExits() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Builds a description of all exits from this room.
- describeItems() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Produces a formatted description of all items present in the room.
- describeRoom() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Produces a full description of the room, including its exits.
- Direction - Enum Class in com.bdtripp.hauntedhouse.model
-
Represents the four cardinal directions used for room navigation.
- DROP - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Drop an item.
E
- EAST - Enum constant in enum class com.bdtripp.hauntedhouse.model.Direction
-
East
- EAT - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Eat an item.
- endGame() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Ends the game.
- execute(GameRequest) - Method in class com.bdtripp.hauntedhouse.service.GameService
-
Processes a player command and returns the resulting game output and status.
- executeCommand(GameRequest) - Method in class com.bdtripp.hauntedhouse.controller.GameController
-
Executes a player command within the current game session.
- Exit - Class in com.bdtripp.hauntedhouse.model
-
Represents an exit connecting one room to another.
- Exit(Direction, Room, ExitType) - Constructor for class com.bdtripp.hauntedhouse.model.Exit
-
Creates an exit and sets its direction, neighbor, and type.
- ExitType - Enum Class in com.bdtripp.hauntedhouse.model
-
Defines the various types of exits in the game world.
F
- findCharacter(String) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Find the character that matches the given name
- findItem(String) - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Returns an item in the inventory
- findItem(String) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Finds an item with a given name
- FIRE - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Fire an item.
- fromString(String) - Static method in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Converts a string into a CommandWord if it is a valid command
- fromString(String) - Static method in enum class com.bdtripp.hauntedhouse.model.Direction
-
Converts a raw input string into a
Direction.
G
- GameController - Class in com.bdtripp.hauntedhouse.controller
-
Exposes the HTTP endpoints used by the client.
- GameController(GameService) - Constructor for class com.bdtripp.hauntedhouse.controller.GameController
-
Create the GameController and initialize the GameService.
- GameEngine - Class in com.bdtripp.hauntedhouse.engine
-
Orchestrates the overall game loop and state transitions.
- GameEngine() - Constructor for class com.bdtripp.hauntedhouse.engine.GameEngine
-
Creates the GameEngine and the game world.
- GameRequest - Class in com.bdtripp.hauntedhouse.api
-
Represents input submitted by the client.
- GameRequest() - Constructor for class com.bdtripp.hauntedhouse.api.GameRequest
-
Creates an empty GameRequest
- GameResponse - Class in com.bdtripp.hauntedhouse.api
-
Represents the response returned to the client after a command is processed.
- GameResponse() - Constructor for class com.bdtripp.hauntedhouse.api.GameResponse
-
Creates an empty GameResponse.
- GameResponse(String, GameStatus) - Constructor for class com.bdtripp.hauntedhouse.api.GameResponse
-
Creates a GameResponse and initialize the output and status.
- GameService - Class in com.bdtripp.hauntedhouse.service
-
Provides the web-facing game service layer.
- GameService() - Constructor for class com.bdtripp.hauntedhouse.service.GameService
-
Creates a new GameService instance.
- GameStatus - Enum Class in com.bdtripp.hauntedhouse.model
-
Represents the status of the game.
- getAcceptanceDialog() - Method in class com.bdtripp.hauntedhouse.model.Character
-
Returns the dialog that the character speaks upon accepting an item
- getAffectValue() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns the amount to change a stat's value by
- getBeamerCharge() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the status of the beamer charge
- getBeamerLocation() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the room where the beamer was last charged.
- getCommand() - Method in class com.bdtripp.hauntedhouse.engine.Parser
-
Returns a tokenized version of the command that was entered by the player
- getCommandList() - Static method in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Get a list of all valid commands
- getCommandWord() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Returns the primary command word supplied by the player.
- getCurrentCarryWeight() - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Calculates the total weight of all items currently in the inventory.
- getCurrentRoom() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the room the player is currently located in.
- getDescription() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns the description of the item
- getDescription() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Returns the description for this room.
- getExit(Direction) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Returns the exit associated with the given direction.
- getHealth() - Method in class com.bdtripp.hauntedhouse.model.Stats
-
Returns the health of the player
- getInitialDialog() - Method in class com.bdtripp.hauntedhouse.model.Character
-
Returns the initial dialog that the character speaks
- getInput() - Method in class com.bdtripp.hauntedhouse.api.GameRequest
-
Returns the players input
- getInventory() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the player's inventory.
- getItemDetails() - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Produces a formatted description of all items in the inventory.
- getItemForReward() - Method in class com.bdtripp.hauntedhouse.model.Character
-
Returns the item as a reward
- getItemSought() - Method in class com.bdtripp.hauntedhouse.model.Character
-
Returns the item that the character is seeking
- getKey() - Method in class com.bdtripp.hauntedhouse.model.World
-
Returns the key used to unlock a specific exit in the world.
- getMaxCarryWeight() - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Returns the maximum weight that the player can carry
- getMovesLeft() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Calculates how many moves the player can still make.
- getName() - Method in class com.bdtripp.hauntedhouse.model.Character
-
Returns the name of the character
- getName() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns the name of the item
- getName() - Method in class com.bdtripp.hauntedhouse.model.Room
-
Returns the name of the room.
- getNeighbor() - Method in class com.bdtripp.hauntedhouse.model.Exit
-
Returns the room that the exit leads to.
- getNeighbor(Direction) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Retrieves the neighboring room in the specified direction.
- getOutput() - Method in class com.bdtripp.hauntedhouse.api.GameResponse
-
Returns the output from the GameEngine.
- getPlayer() - Method in class com.bdtripp.hauntedhouse.model.World
-
Returns the player associated with this world.
- getPreviousRoom() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the previous room and removes it from the room history
- getRandomRoom() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Returns a random room in the haunted house
- getRoom(RoomName) - Method in class com.bdtripp.hauntedhouse.model.World
-
Get the room that matches a name
- getRoomHistory() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns the stack of rooms the player has previously visited.
- getRooms() - Method in class com.bdtripp.hauntedhouse.model.World
-
Returns all rooms that exist in the game world.
- getSecondWord() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Returns the second word of the command, if present.
- getStartingRoom() - Method in class com.bdtripp.hauntedhouse.model.World
-
Returns the room where the player begins the game.
- getStats() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Returns a formatted summary of the player's current stats.
- getStatToAffect() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns the stat the item has an effect on
- getStatus() - Method in class com.bdtripp.hauntedhouse.api.GameResponse
-
Returns the status of the game.
- getStrength() - Method in class com.bdtripp.hauntedhouse.model.Stats
-
Returns the strength of the player
- getThirdWord() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Returns the third word of the command, if present.
- getType() - Method in class com.bdtripp.hauntedhouse.model.Exit
-
Returns the type of exit.
- getWeight() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns the weight of the item
- give(Command) - Method in class com.bdtripp.hauntedhouse.engine.CommandProcessor
-
Makes the player give an item to a character
- GIVE - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Give an item to a character.
- GO - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Move to another room.
H
- HALLWAY - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A hallway in the house.
- hasItem(Item) - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Checks if a particular item is in the inventory
- hasSecondWord() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Indicates whether the command includes a second word.
- hasThirdWord() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Indicates whether the command includes a third word.
- HEALTH - Enum constant in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
The player's health stat.
- HELP - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Display help information.
- home() - Method in class com.bdtripp.hauntedhouse.controller.PageController
-
Handles requests to the home page.
I
- INDOOR_GARDEN - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
An indoor garden area.
- ingest(Item) - Method in class com.bdtripp.hauntedhouse.model.Player
-
Makes a player ingest an item
- Inventory - Class in com.bdtripp.hauntedhouse.model
-
Represents a collection of items carried by the player.
- Inventory(int) - Constructor for class com.bdtripp.hauntedhouse.model.Inventory
-
Creates a new inventory with the specified maximum carry weight.
- isCommand(String) - Static method in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Checks whether a given string is a valid command word.
- isEdible() - Method in class com.bdtripp.hauntedhouse.model.Item
-
Returns whether this item is edible or not
- isGameOver() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Checks if the game is over
- isUnknown() - Method in class com.bdtripp.hauntedhouse.model.Command
-
Indicates whether the command word is unrecognized.
- Item - Class in com.bdtripp.hauntedhouse.model
-
Represents an item in the game world.
- Item(String, String, int, boolean, PlayerStat, int) - Constructor for class com.bdtripp.hauntedhouse.model.Item
-
Creates a new item
- ITEMS - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Show the player's inventory.
L
- LIBRARY - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
The library.
- LOCKED - Enum constant in enum class com.bdtripp.hauntedhouse.model.ExitType
-
Indicates that the exit is locked.
- LOOK - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Look around the current room.
M
- main(String[]) - Static method in class com.bdtripp.hauntedhouse.engine.CliRunner
-
The main entry point.
- main(String[]) - Static method in class com.bdtripp.hauntedhouse.WebApp
-
Launches the Haunted House web application.
- MAX_CARRY_WEIGHT - Enum constant in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
The player's maximum carry weight stat.
- movePlayerTo(Room, boolean) - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Moves the player to the specified room and returns details about the room
- moveToRoom(Room, boolean) - Method in class com.bdtripp.hauntedhouse.model.Player
-
Moves the player to the specified room
N
- NONE - Enum constant in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
Indicates that the item does not affect any player stat.
- NORTH - Enum constant in enum class com.bdtripp.hauntedhouse.model.Direction
-
North
O
- OUTSIDE - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
The area outside the house.
P
- PageController - Class in com.bdtripp.hauntedhouse.controller
-
Serves the main HTML page.
- PageController() - Constructor for class com.bdtripp.hauntedhouse.controller.PageController
-
Creates a new PageController.
- Parser - Class in com.bdtripp.hauntedhouse.engine
-
Parses raw player input into structured commands.
- Parser(InputStream) - Constructor for class com.bdtripp.hauntedhouse.engine.Parser
-
For the CLI application
- Parser(String) - Constructor for class com.bdtripp.hauntedhouse.engine.Parser
-
For the Web application
- Player - Class in com.bdtripp.hauntedhouse.model
-
Represents a player in the game world.
- Player(String, Inventory) - Constructor for class com.bdtripp.hauntedhouse.model.Player
-
Creates a new player with the given name and starting inventory.
- PlayerStat - Enum Class in com.bdtripp.hauntedhouse.model
-
Enumerates all supported stat types.
- processCommand(Command) - Method in class com.bdtripp.hauntedhouse.engine.CommandProcessor
-
Given a command, process (that is: execute) the command.
- processCommand(Command) - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Given a command, process (that is: execute) the command.
Q
- QUIT - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Quit the game.
R
- removeItem(Item) - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Removes an item from the inventory
- removeItem(Item) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Removes an item from the room
- Room - Class in com.bdtripp.hauntedhouse.model
-
Represents a room in the game world.
- Room(RoomName, String) - Constructor for class com.bdtripp.hauntedhouse.model.Room
-
Creates a new room with the given name and description.
- RoomName - Enum Class in com.bdtripp.hauntedhouse.model
-
Enumerates all supported room names.
- ROOT_CELLAR - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A storage cellar.
- RUNNING - Enum constant in enum class com.bdtripp.hauntedhouse.model.GameStatus
-
Indicates that the game is currently running.
S
- setBeamerCharge(boolean) - Method in class com.bdtripp.hauntedhouse.model.Player
-
Sets whether the player's beamer is currently charged.
- setBeamerLocation() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Sets the location of a beamer charge
- setExit(Direction, Room, ExitType) - Method in class com.bdtripp.hauntedhouse.model.Room
-
Creates an exit for the room
- setHealth(int) - Method in class com.bdtripp.hauntedhouse.model.Stats
-
Set the health of the player
- setInput(String) - Method in class com.bdtripp.hauntedhouse.api.GameRequest
-
Sets the player's input
- setMaxCarryWeight(int) - Method in class com.bdtripp.hauntedhouse.model.Inventory
-
Updates the maximum weight the player is allowed to carry.
- setOutput(String) - Method in class com.bdtripp.hauntedhouse.api.GameResponse
-
Sets the output from the GameEngine.
- setStatus(GameStatus) - Method in class com.bdtripp.hauntedhouse.api.GameResponse
-
Sets the status of the game.
- setStrength(int) - Method in class com.bdtripp.hauntedhouse.model.Stats
-
Set the strength of the player
- SOUTH - Enum constant in enum class com.bdtripp.hauntedhouse.model.Direction
-
South
- start() - Method in class com.bdtripp.hauntedhouse.controller.GameController
-
Starts a new game session.
- startGame() - Method in class com.bdtripp.hauntedhouse.engine.GameEngine
-
Starts the game by placing the player in the starting room
- startGame() - Method in class com.bdtripp.hauntedhouse.service.GameService
-
Starts a new game session and returns the initial response.
- Stats - Class in com.bdtripp.hauntedhouse.model
-
Represents a player's statistics.
- Stats(int, int) - Constructor for class com.bdtripp.hauntedhouse.model.Stats
-
Creates a new Stats object with the specified health and strength values.
- STATS - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Show the player's statistics.
- STOPPED - Enum constant in enum class com.bdtripp.hauntedhouse.model.GameStatus
-
Indicates that the game has been stopped.
- STRENGTH - Enum constant in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
The player's strength stat.
- STUDY - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A study room.
T
- TAKE - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Pick up an item.
- talk(Command) - Method in class com.bdtripp.hauntedhouse.engine.CommandProcessor
-
Makes a play talk to a character
- TALK - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Talk to a character.
- toString() - Method in enum class com.bdtripp.hauntedhouse.model.Direction
-
Returns the enum name in lowercase for display and user-facing output.
- toString() - Method in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
Returns the enum name in lowercase with underscores replaced by spaces.
U
- UNKNOWN - Enum constant in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Represents an unrecognized or invalid command.
- UNLOCKED - Enum constant in enum class com.bdtripp.hauntedhouse.model.ExitType
-
Indicates that the exit is unlocked.
- updateRoomHistory() - Method in class com.bdtripp.hauntedhouse.model.Player
-
Adds the current room to the room history
V
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.Direction
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.ExitType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.GameStatus
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.bdtripp.hauntedhouse.model.RoomName
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.CommandWord
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.Direction
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.ExitType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.GameStatus
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.PlayerStat
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.bdtripp.hauntedhouse.model.RoomName
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- WebApp - Class in com.bdtripp.hauntedhouse
-
The main entry point for the Haunted House web application.
- WebApp() - Constructor for class com.bdtripp.hauntedhouse.WebApp
-
Creates a new WebApp instance.
- WEST - Enum constant in enum class com.bdtripp.hauntedhouse.model.Direction
-
West
- WINE_CELLAR - Enum constant in enum class com.bdtripp.hauntedhouse.model.RoomName
-
A wine storage cellar.
- World - Class in com.bdtripp.hauntedhouse.model
-
Represents the complete game world.
- World(Player, Map<RoomName, Room>, Room, Item) - Constructor for class com.bdtripp.hauntedhouse.model.World
-
Create the game world that has a player, rooms, a starting room, key etc.
- WorldBuilder - Class in com.bdtripp.hauntedhouse.engine
-
Builds the complete game world.
- WorldBuilder() - Constructor for class com.bdtripp.hauntedhouse.engine.WorldBuilder
-
Creates a new WorldBuilder instance.
All Classes and Interfaces|All Packages