Index

A C D E F G H I K L M N P R S T V X 
All Classes and Interfaces|All Packages|Constant Field Values

A

activeFortune - Variable in class Knight
Stores the active fortune **if** one exists (else null)
activeKnights - Variable in class GameData
List of the active knights, they are references, not copies.
addDamage(int) - Method in class MOB
Adds damage to the mobs overall damage.
addXP(int) - Method in class Knight
Adds a whole number to the knights current experience point value
armor - Variable in class Fortune
value of the armor bonus
armor - Variable in class MOB
The armor rating of the mob
Attributes - Interface in Unnamed Package
Basic "attributes" or stats used throughout the game.

C

checkContinue() - Method in class ConsoleView
Checks with the user by asking if they want to continue their quest.
checkContinue() - Method in interface GameView
 
clear() - Method in class CombatEngine
Sets all fortunes to *null* across all knights.
CombatEngine - Class in Unnamed Package
The combat engine runs the combat for the game.
CombatEngine(GameData, GameView) - Constructor for class CombatEngine
To run the combat, a GameData and GameView is essential for it to work.
ConsoleView - Class in Unnamed Package
The console view provides a specific implementation of writing output to the the Console / System.out The only methods implemented are those that match the GameView interface.
ConsoleView() - Constructor for class ConsoleView
 
copy() - Method in class MOB
Copies the mob to a new mob.
CSVGameData - Class in Unnamed Package
Reads the game data from CSV files, and loads it into the protected methods in GameData.
CSVGameData(String, String) - Constructor for class CSVGameData
Constructs the CSVGameData object, by loading CSV files passed into it.

D

D10 - Enum constant in enum class DiceType
a 10 sided die
D12 - Enum constant in enum class DiceType
a 12 sided die
D20 - Enum constant in enum class DiceType
a 20 sided die
D4 - Enum constant in enum class DiceType
a 4 sided die
D6 - Enum constant in enum class DiceType
a 6 sided die
D8 - Enum constant in enum class DiceType
a 8 sided die
damage - Variable in class MOB
The amount of damage the MOB has taken
damageDie - Variable in class MOB
the type of damage die used if the mob successfully strikes the target
data - Variable in class CombatEngine
The data for the game, passed in as part of the constructor.
data - Variable in class GameController
Game data passed into the constructor.
dice - Variable in class CombatEngine
A DiceSet to be used for the Combat engine
dice - Variable in class DiceSet
Random number generator, could also be static.
DiceSet - Class in Unnamed Package
A simple class that handles rolling of Dice.
DiceSet() - Constructor for class DiceSet
 
DiceType - Enum Class in Unnamed Package
Enumeration representing different types of dice.
DiceType() - Constructor for enum class DiceType
 
displayMainMenu() - Method in class ConsoleView
Displays a "menu" for the player.
displayMainMenu() - Method in interface GameView
 
doBattle(List<MOB>, List<MOB>) - Method in class CombatEngine
Helper method.
dtype - Variable in class Fortune
the damage dice modifier.

E

endGame() - Method in class ConsoleView
Prints a goodbye message for completing the game.
endGame() - Method in interface GameView
 
engine - Variable in class GameController
combat engine, passed into the constructor

F

findKnight(String, List<Knight>) - Method in class GameData
Finds a knight based on nameOrId based on the a List of knights passed into it.
Fortune - Class in Unnamed Package
Fortunes are bonuses that can be applied to knights before they go on quests.
Fortune(String, int, int, int) - Constructor for class Fortune
Basic constructor assuming no DamageDice replacement
Fortune(String, int, int, int, DiceType) - Constructor for class Fortune
Constructor with a damage dice replacement by DiceType type
fortunes - Variable in class GameData
List of fortunes.

G

GameController - Class in Unnamed Package
Central point of communication between GameData, GameView and CombatEngine.
GameController(GameData, GameView, CombatEngine) - Constructor for class GameController
The GameController needs all major components of the game to work - view, data, and combat
gamedata - Static variable in class Main
The location of the game data.
GameData - Class in Unnamed Package
GameData handles the data for the game.
GameData() - Constructor for class GameData
 
GameView - Interface in Unnamed Package
GameView defines the various methods for getting and sending information to the client.
getActive(String) - Method in class GameData
Gets an active knight based on a string or id.
getActiveFortune() - Method in class Knight
Gets the active fortune currently being applied to the knight.
getActiveKnights() - Method in class GameData
Returns list of knights currently set as active.
getArmor() - Method in interface Attributes
Gets the armor attribute value, often between 8-20 for a D20 system, but not fixed.
getArmor() - Method in class Fortune
Return the amount of bonus to the knights armor
getArmor() - Method in class Knight
Gets the armor value of the knight.
getArmor() - Method in class MOB
 
getDamage() - Method in class MOB
Gets the amount of damage the MOB has taken.
getDamageDie() - Method in interface Attributes
Gets the Damage Die Type.
getDamageDie() - Method in class Fortune
Returns the replacement damage dice for the knight.
getDamageDie() - Method in class Knight
Gets the damageDie value of the knight.
getDamageDie() - Method in class MOB
 
getHitModifier() - Method in interface Attributes
A whole number of any int value to apply when making 'hit roles'.
getHitModifier() - Method in class Fortune
Returns the the bonus to the knights hit modifier.
getHitModifier() - Method in class Knight
Gets the hit modifier value of the knight.
getHitModifier() - Method in class MOB
 
getHP() - Method in class MOB
Essentially returns the current HPs of the MOB.
getId() - Method in class Knight
Gets the knights id as an Integer (not int).
getKnight(String) - Method in class GameData
Gets an knight from the all knights list based on a string or id.
getKnights() - Method in class GameData
Returns all knights.
getMaxHP() - Method in interface Attributes
Gets the maximum hit points attribute.
getMaxHP() - Method in class Fortune
return the amount of bonus to the knights maxHP
getMaxHP() - Method in class Knight
Gets the maxHP value of the knight.
getMaxHP() - Method in class MOB
 
getName() - Method in class Fortune
returns the name of the fortune card - often named after the knightly virtues.
getName() - Method in class MOB
Returns the generic name of the MOB
getRandomFortune() - Method in class GameData
Gets a random fortune from GameData.fortunes Since fortunes.size() gives you the total fortunes, and random.nextInt(N) gives you a random number between 0-(N-1), combine them!
getRandomMonsters() - Method in class GameData
Gets a random monster from GameData.monsters assuming the max number of monsters is less than or equal to activeKnights.size().
getRandomMonsters(int) - Method in class GameData
Builds a list of random monsters of size number.
getXP() - Method in class Knight
Returns the knights experience points.

H

hitModifier - Variable in class Fortune
value of the hitModifier
hitModifier - Variable in class MOB
The hitModifier of the MOB.
hpBonus - Variable in class Fortune
bonus to apply to HP.

I

id - Variable in class Knight
ID - set as final, as may not change after building the knight
in - Variable in class ConsoleView
Initialized at the class level to prevent conflicts with System.in
initialize() - Method in class CombatEngine
Before every quest, active knights are assigned random fortunes (GameData.getRandomFortune().

K

Knight - Class in Unnamed Package
A knight is the primary protagonist of the game.
Knight(int, String, int, int, int, DiceType, int) - Constructor for class Knight
Basic constructor for the knight object
knightNotFound() - Method in class ConsoleView
Prints
knightNotFound() - Method in interface GameView
 
knights - Variable in class GameData
List of all the knights available

L

listKnights(List<Knight>) - Method in class ConsoleView
Lists the knights by id: name.
listKnights(List<Knight>) - Method in interface GameView
 
loadGameData(String) - Method in class CSVGameData
Loads game data based on fortunes or MOBs.
loadSaveData(String) - Method in class CSVGameData
Loads in the data from a knights CSV file.

M

main(String[]) - Static method in class Main
Takes in command line parameters, looks through the program arguments.
Main - Class in Unnamed Package
Main driver class for the Game.
Main() - Constructor for class Main
 
MAX_ACTIVE - Static variable in class GameData
the max number of active knights (defined by specifications to be 4)
maxHP - Variable in class MOB
the maxHP of the mob
MOB - Class in Unnamed Package
A MOB, short for Mobile Object, represents all 'moving' objects in the game, most notably monsters, though knight which is a specific type of MOB (playable) inherits from MOB as they share characteristics.
MOB(String, int, int, int, DiceType) - Constructor for class MOB
The basic constructor for the mob.
monsters - Variable in class GameData
List of MOBs/Monsters

N

name - Variable in class Fortune
name of the fortune
name - Variable in class MOB
Name value is set on creation and cannot be changed.

P

parseGameDataLine(Scanner) - Method in class CSVGameData
Optional helper method.
printBattleText(List<MOB>, List<Knight>) - Method in class ConsoleView
Lists a number of knights side by side with their 'foes' (aka monsters).
printBattleText(List<MOB>, List<Knight>) - Method in interface GameView
 
printBattleText(MOB) - Method in class ConsoleView
Prints that the MOB was defeated.
printBattleText(MOB) - Method in interface GameView
 
printDefeated() - Method in class ConsoleView
Prints when all knights are defeated, followed by an empty line.
printDefeated() - Method in interface GameView
 
printFortunes(List<Knight>) - Method in class ConsoleView
Prints fortunes for the knight that they draw at the beginning of the quest by cycling through the provided list of knights.
printFortunes(List<Knight>) - Method in interface GameView
 
printHelp() - Method in class ConsoleView
Prints the help menu.
printHelp() - Method in interface GameView
 
processArgs(String[]) - Static method in class Main
loops through each each program argument (args).
processCommand(String) - Method in class GameController
Setup as a helper method for GameController.start() }, processes commands the client passes in through GameView.displayMainMenu().
processRemoveActive(String) - Method in class GameController
Optional helper method that helped keep processCommand(String) cleaner.
processSetActive(String) - Method in class GameController
Optional helper method that helped keep processCommand(String) cleaner.
processShowKnight(String) - Method in class GameController
Optional helper method that helped keep processCommand(String) cleaner.

R

random - Static variable in class GameData
Random number generator, used for grabbing random items for the structures.
readFile(String) - Method in class CSVGameData
Optional method, but we used it so that we could isolate our try/catch statements to a single method.
removeActive(Knight) - Method in class GameData
Removes a knight from the GameData.activeKnights list and resets the damage on the knight! Remember, list.remove returns true if the remove was successful.
resetDamage() - Method in class MOB
Resets the damage taken to 0.
rnd - Variable in class CombatEngine
Used in runCombat() to select who is fighting who.
roll(DiceType) - Method in class DiceSet
Rolls a dice based on DiceType.
runCombat() - Method in class CombatEngine
Runs the combat simulation (optional).

S

save(String) - Method in class CSVGameData
Saves out the knight data as a CSV to the given filename.
save(String) - Method in class GameData
Required for the implementing class to be able to save the file
saveData - Static variable in class Main
The location of the saved file, with a default (new game) file being knights.csv.
setActive(Knight) - Method in class GameData
Adds a knight to the GameData.activeKnights list, as long as there are no more than 4 knights in the list.
setActiveFailed() - Method in class ConsoleView
Prints the following message followed by a blank line:
setActiveFailed() - Method in interface GameView
 
setActiveFortune(Fortune) - Method in class Knight
Sets the active fortune.
showKnight(Knight) - Method in class ConsoleView
Prints a knight to the console, plus a blank line.
showKnight(Knight) - Method in interface GameView
 
splashScreen() - Method in class ConsoleView
Prints a splashScreen that is called at the launch of the game.
splashScreen() - Method in interface GameView
 
start() - Method in class GameController
Starts the game, causing it to run until a client exits.

T

toCSV() - Method in class Knight
Returns a Comma Separated value representation of the knight.
toString() - Method in class Fortune
Returns a nicely formatted String value of the fortune.
toString() - Method in class Knight
The toString for the knight, returns a 'knight card' examples of the card as as follows:
toString() - Method in class MOB
Builds a MOB Card for easy printing of the stats.

V

valueOf(String) - Static method in enum class DiceType
Returns the enum constant of this class with the specified name.
values() - Static method in enum class DiceType
Returns an array containing the constants of this enum class, in the order they are declared.
view - Variable in class CombatEngine
The View used for the game, passed in as part of the constructor.
view - Variable in class GameController
game view passed into the constructor

X

xp - Variable in class Knight
keeps track of experience points.
A C D E F G H I K L M N P R S T V X 
All Classes and Interfaces|All Packages|Constant Field Values