Answer To: Lab week 7 – Implementing Move in the MazeGame Explore the codebase 1. Download the “Lab 7” code...
Valupadasu answered on Oct 24 2021
LAB7/.classpath
LAB7/.idea/.gitignore
# Default ignored files
/shelf/
/workspace.xml
LAB7/.idea/aws.xml
LAB7/.idea/misc.xml
LAB7/.idea/modules.xml
LAB7/.idea/workspace.xml
1568819643966
1568819643966
LAB7/.project
Lab7-1-StartupSequence-StartupCodeLab7
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
LAB7/bin/mazegame/boundary/IMazeClient.class
package mazegame.boundary;
public abstract interface IMazeClient {
public abstract String getReply(String);
public abstract void playerMessage(String);
public abstract String getCommand();
}
LAB7/bin/mazegame/boundary/IMazeData.class
package mazegame.boundary;
public abstract interface IMazeData {
public abstract mazegame.entity.Location getStartingLocation();
public abstract String getWelcomeMessage();
}
LAB7/bin/mazegame/control/CommandHandler.class
package mazegame.control;
public synchronized class CommandHandler {
private commandState.CommandState availableCommands;
public void CommandHandler();
public CommandResponse processTurn(String, mazegame.entity.Player);
private ParsedInput parse(String);
}
LAB7/bin/mazegame/control/CommandResponse.class
package mazegame.control;
public synchronized class CommandResponse {
private Boolean finishedGame;
private String message;
public void CommandResponse(String);
public void CommandResponse(String, Boolean);
public void setFinishedGame(Boolean);
public boolean isFinishedGame();
public String getMessage();
public void setMessage(String);
}
LAB7/bin/mazegame/control/commands/AttackCommand.class
package mazegame.control.commands;
public synchronized class AttackCommand implements Command {
public void AttackCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/BuyCommand.class
package mazegame.control.commands;
public synchronized class BuyCommand implements Command {
public void BuyCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/Command.class
package mazegame.control.commands;
public abstract interface Command {
public abstract mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/DropCommand.class
package mazegame.control.commands;
public synchronized class DropCommand implements Command {
public void DropCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/EquipCommand.class
package mazegame.control.commands;
public synchronized class EquipCommand implements Command {
public void EquipCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/GetCommand.class
package mazegame.control.commands;
public synchronized class GetCommand implements Command {
public void GetCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/InvCommand.class
package mazegame.control.commands;
public synchronized class InvCommand implements Command {
public void InvCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/LookCommand.class
package mazegame.control.commands;
public synchronized class LookCommand implements Command {
private mazegame.control.CommandResponse response;
public void LookCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/MoveCommand.class
package mazegame.control.commands;
public synchronized class MoveCommand implements Command {
public void MoveCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/QuitCommand.class
package mazegame.control.commands;
public synchronized class QuitCommand implements Command {
public void QuitCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/SellCommand.class
package mazegame.control.commands;
public synchronized class SellCommand implements Command {
public void SellCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/UnequipCommand.class
package mazegame.control.commands;
public synchronized class UnequipCommand implements Command {
public void UnequipCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commands/UnlockCommand.class
package mazegame.control.commands;
public synchronized class UnlockCommand implements Command {
public void UnlockCommand();
public mazegame.control.CommandResponse execute(mazegame.control.ParsedInput, mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commandState/AttackState.class
package mazegame.control.commandState;
public synchronized class AttackState extends CommerceState {
public void AttackState();
public CommandState update(mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commandState/CommandState.class
package mazegame.control.commandState;
public abstract synchronized class CommandState {
private java.util.HashMap availableCommands;
public abstract CommandState update(mazegame.entity.Player);
public void CommandState();
public java.util.HashMap getAvailableCommands();
public void setAvailableCommands(java.util.HashMap);
public mazegame.control.commands.Command getCommand(String);
public java.util.ArrayList getLabels();
}
LAB7/bin/mazegame/control/commandState/CommerceState.class
package mazegame.control.commandState;
public synchronized class CommerceState extends CommandState {
public void CommerceState();
public CommandState update(mazegame.entity.Player);
}
LAB7/bin/mazegame/control/commandState/MovementState.class
package mazegame.control.commandState;
public synchronized class MovementState extends CommandState {
public void MovementState();
public CommandState update(mazegame.entity.Player);
}
LAB7/bin/mazegame/control/DungeonMaster.class
package mazegame.control;
public synchronized class DungeonMaster {
private mazegame.boundary.IMazeClient gameClient;
private mazegame.boundary.IMazeData gameData;
private mazegame.entity.Player thePlayer;
private CommandHandler playerTurnHandler;
public void DungeonMaster(mazegame.boundary.IMazeData, mazegame.boundary.IMazeClient);
public void printWelcome();
public void setupPlayer();
public void runGame();
public boolean handlePlayerTurn();
}
LAB7/bin/mazegame/control/MazeGame.class
package mazegame.control;
public synchronized class MazeGame {
public void MazeGame();
public static void main(String[]);
}
LAB7/bin/mazegame/control/ParsedInput.class
package mazegame.control;
public synchronized class ParsedInput {
private String command;
private java.util.ArrayList arguments;
public void ParsedInput();
public void ParsedInput(String, java.util.ArrayList);
public String getCommand();
public void setCommand(String);
public java.util.ArrayList getArguments();
public void setArguments(java.util.ArrayList);
}
LAB7/bin/mazegame/control/Parser.class
package mazegame.control;
public synchronized class Parser {
private java.util.ArrayList dropWords;
private java.util.ArrayList validCommands;
public void Parser(java.util.ArrayList);
public ParsedInput parse(String);
}
LAB7/bin/mazegame/entity/Armor.class
package mazegame.entity;
public synchronized class Armor extends Item {
private int bonus;
public void Armor(String, int, double, String);
public int getBonus();
public void setBonus(int);
}
LAB7/bin/mazegame/entity/Blacksmith.class
package mazegame.entity;
public synchronized class Blacksmith extends Location {
public void Blacksmith();
public void Blacksmith(String, String);
}
LAB7/bin/mazegame/entity/Character.class
package mazegame.entity;
public synchronized class Character {
private int agility;
private int lifePoints;
private String name;
private int strength;
public Dice m_Dice;
public Weapon m_Weapon;
public void Character();
public void Character(String);
public int getAgility();
public void setAgility(int);
public int getLifePoints();
public void setLifePoints(int);
public String getName();
private void setName(String);
public int getStrength();
public void setStrength(int);
}
LAB7/bin/mazegame/entity/Collectible.class
package mazegame.entity;
public synchronized class Collectible extends Item {
private int restoreLifepoint;
public void Collectible(String, int);
public int getRestoreLifepoint();
}
LAB7/bin/mazegame/entity/Dice.class
package mazegame.entity;
public synchronized class Dice {
private int faces;
private static java.util.Random generator;
public void Dice(int);
public int roll();
static void ();
}
LAB7/bin/mazegame/entity/Exit.class
package mazegame.entity;
public synchronized class Exit {
private String description;
private Location destination;
private boolean locked;
public void Exit(String, Location);
public void Exit(String, Location, boolean);
public boolean isLocked();
public void setLocked(boolean);
public Location getDestination();
public void setDestination(Location);
public String getDescription();
public void setDescription(String);
}
LAB7/bin/mazegame/entity/Inventory.class
package mazegame.entity;
public synchronized class Inventory {
private Money gold;
private java.util.HashMap itemList;
public void Inventory();
public void addMoney(double);
public boolean removeMoney(int);
public Money getGold();
public boolean addItem(Item);
public Item removeItem(String);
public Item getItem(String);
public String printItemList();
public String toString();
public java.util.HashMap getItemList();
public Item findItem(String);
public boolean containsItem(String);
}
LAB7/bin/mazegame/entity/Item.class
package mazegame.entity;
public abstract synchronized class Item {
private String label;
private int price;
private double weight;
private String description;
public void Item(String);
public void Item(String, int, double, String);
public String getLabel();
public int getPrice();
public double getWeight();
public String getDescription();
public String toString();
}
LAB7/bin/mazegame/entity/Location.class
package mazegame.entity;
public synchronized class Location {
private java.util.HashMap exits;
private String description;
private String label;
private java.util.HashMap nonPlayerCharacters;
private java.util.HashMap weapons;
private java.util.HashMap inventory;
public void Location();
public void Location(String, String);
public boolean addNonPlayerCharacters(String, NonPlayerCharacter);
public boolean addWeapons(String, Item);
public boolean addExit(String, Exit);
public boolean addItems(String, Item);
public Exit getExit(String);
public NonPlayerCharacter getNonPlayerCharacters(String);
public Item getItem(String);
public void removeItem(String);
public String getDescription();
public void setDescription(String);
public String getLabel();
public void setLabel(String);
public String availableExits();
public String availableCharacters();
public java.util.HashMap getNonPlayerCharacters();
public String availableItems();
public boolean containsExit(String);
public boolean containsCharacter(String);
public boolean containsWeapon(String);
public String toString();
}
LAB7/bin/mazegame/entity/Money.class
package mazegame.entity;
public synchronized class Money {
private double total;
public void Money();
public void Money(double);
public void Add(double);
public boolean Subtract(double);
public double getWeight();
public String toString();
public double getTotal();
}
LAB7/bin/mazegame/entity/NonPlayerCharacter.class
package mazegame.entity;
public synchronized class NonPlayerCharacter extends Character {
private Boolean hostile;
private String conversation;
private Inventory inventory;
private java.util.ArrayList equipped;
public void NonPlayerCharacter();
public void NonPlayerCharacter(String, int, int, int, Boolean);
public String getName();
public boolean getHostile();
public void setHostile(boolean);
public int getStrength();
public int getAgility();
public int getLifePoints();
public String toString();
public String getConversation();
public void setConversation(String);
public void equipWeapon(Weapon);
}
LAB7/bin/mazegame/entity/Player.class
package mazegame.entity;
public synchronized class Player extends Character {
private Location currentLocation;
private Location lastLocation;
private static Player instance;
private int weightLimit;
private Inventory playerInventory;
private mazegame.utility.WeightLimit weightModifier;
private java.util.ArrayList equipped;
public Location getLastLocation();
public void setLastLocation(Location);
private void Player();
private void Player(String, int, int, int);
public static Player getInstance(String, int, int, int);
public int getWeightLimit();
public void setWeightLimit(int);
public Location getCurrentLocation();
public void setCurrentLocation(Location);
public Inventory getPlayerInventory();
public int getStrength();
public void setStrength(int);
public int getLifePoints();
public int getAgility();
public String equipWeapon(Weapon);
public java.util.ArrayList getEquipped();
public void setEquipped(java.util.ArrayList);
static void ();
}
LAB7/bin/mazegame/entity/Weapon.class
package mazegame.entity;
public synchronized class Weapon extends Item {
public Dice m_Dice;
public void Weapon(String, int, double, String);
public String getLabel();
public String getDescription();
public double getWeight();
}
LAB7/bin/mazegame/HardCodedData.class
package mazegame;
public synchronized class HardCodedData implements boundary.IMazeData {
private entity.Location startUp;
private utility.WeightLimit weightLimit;
private utility.WeaponTable weapons;
public void HardCodedData();
public entity.Location getStartingLocation();
public String getWelcomeMessage();
private void createLocations();
private void populateStrengthTable();
private void populateAgilityTable();
private void populateWeightLimitTable();
public void populateWeaponsTable();
}
LAB7/bin/mazegame/SimpleConsoleClient.class
package mazegame;
public synchronized class SimpleConsoleClient implements boundary.IMazeClient {
public void SimpleConsoleClient();
public String getReply(String);
public void playerMessage(String);
public String getCommand();
}
LAB7/bin/mazegame/utility/AgilityTable.class
package mazegame.utility;
public synchronized class AgilityTable {
private static AgilityTable instance;
private java.util.HashMap lookup;
private void AgilityTable(java.util.HashMap);
public static AgilityTable getInstance();
public void setModifier(int, int);
public int getModifier(int);
}
LAB7/bin/mazegame/utility/DiceRoller.class
package mazegame.utility;
public synchronized class DiceRoller {
private static DiceRoller instance;
private mazegame.entity.Dice d6;
private void DiceRoller();
public static DiceRoller getInstance();
public int generateAbilityScore();
static void ();
}
LAB7/bin/mazegame/utility/NonPlayerCharacterCollection.class
package mazegame.utility;
public synchronized class NonPlayerCharacterCollection extends java.util.HashMap {
public void NonPlayerCharacterCollection();
public String toString();
}
LAB7/bin/mazegame/utility/StrengthTable.class
package mazegame.utility;
public synchronized class StrengthTable {
private static StrengthTable instance;
private java.util.HashMap lookup;
private void StrengthTable(java.util.HashMap);
public static StrengthTable getInstance();
public void setModifier(int, int);
public int getModifier(int);
}
LAB7/bin/mazegame/utility/WeaponTable.class
package mazegame.utility;
public synchronized class WeaponTable {
private static WeaponTable instance;
private java.util.HashMap lookup;
private void WeaponTable(java.util.HashMap);
public static WeaponTable getInstance();
public void setWeapon(String, mazegame.entity.Item);
public Object getWeapon(String);
}
LAB7/bin/mazegame/utility/WeightLimit.class
package mazegame.utility;
public synchronized class WeightLimit {
private static WeightLimit instance;
private java.util.HashMap lookup;
private void WeightLimit(java.util.HashMap);
public static WeightLimit getInstance();
public void setModifier(int, int);
public int getModifier(int);
}
LAB7/Lab7.iml
...