Index

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

A

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 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.
CSVReader - Class in Unnamed Package
This reader was implemented in practical 4, feel free to use that version.
CSVReader(String) - Constructor for class CSVReader
Basic overloaded constructor that assumes the first line should be skipped.
CSVReader(String, boolean) - Constructor for class CSVReader
A constructor that requires the name of the file to open

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
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.
displayMainMenu() - Method in class ConsoleView
Displays a "menu" for the player.
displayMainMenu() - Method in interface GameView
 

E

endGame() - Method in class ConsoleView
Prints a goodbye message for completing the game.
endGame() - Method in interface GameView
 

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 - 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
Modifier to apply to "to hit" roles before calculate hits
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
getNext() - Method in class CSVReader
Reads a line (nextLine()) and splits it into a String array by the DELIMINATOR, if the line is empty it will also return null.
getRandomFortune() - Method in class GameData
Gets a random fortune from GameData.fortunes
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

hasNext() - Method in class CSVReader
Checks to see if the fileScanner has more lines and returns the answer.
hitModifier - Variable in class MOB
The hitModifier of the MOB.

I

id - Variable in class Knight
ID - set as final, as may not change after building the knight
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
 
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

P

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
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.
printFortunes(List<Knight>) - Method in interface GameView
 
printHelp() - Method in class ConsoleView
Prints the help menu.
printHelp() - Method in interface GameView
 
processCommand(String) - Method in class GameController
Setup as a helper method for GameController.start() }, processes commands the client passes in through GameView.displayMainMenu().

R

random - Static variable in class GameData
Random number generator, used for grabbing random items for the structures.
removeActive(Knight) - Method in class GameData
Removes a knight from the GameData.activeKnights list and resets the damage on the knight!
resetDamage() - Method in class MOB
Resets the damage taken to 0.
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
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:
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 Seperated 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.

X

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