You are required to logically extend the functionality of the Maze Game introduced during lectures, via the modification of the code base as well as documentation and implementation of various user...

1 answer below »
You are required to logically extend the functionality of the Maze Game introduced during lectures, via the modification of the code base as well as documentation and implementation of various user stories. You will use the Boost methodology discussed during lectures, which requires the use of pair programming. All documentation, other than the customized game map, must be completed individually. The code base provided for this assignment has already implemented the “warm up” and some “sets”. You will be implementing numerous other “sets” for this assignment using the Boost methodology. The “warm down” stage is not required. You are free to take ideas discussed during lectures and implement these in your own version of the code base provided in Moodle for this assignment. This assignment will be marked according to the functionality of your code, in addition to the elegance and extensibility of your design and the quality of your documentation.
Answered Same DayMay 17, 2021ITECH7201

Answer To: You are required to logically extend the functionality of the Maze Game introduced during lectures,...

Pritam answered on Jun 01 2021
127 Votes
HardCodedData.java
HardCodedData.java
package mazegame;
import mazegame.boundary.IMazeData;
import mazegame.entity.Exit;
import mazegame.entity.Location;
public class HardCodedData implements IMazeData {
    private Location startUp;

    public HardCodedData()
    {
        createLocations();
    }

    public Location getStartingLocation()
    {
        return startUp;
    }

public String getWelcomeMessage()
    {
        return "Welcome to the Mount Helanous";
    }

    private void createLocations () 
    {
        startUp = new Location ("an office with paper strewn everywhere, how anyone can work here effectively is a mystery", "Julies Office");
        Location lounge = new Location ("an open space containing comfortable looking couches and artwork", "Airport Lounge");
        Location t127 = new Location ("a lecture theatre", "T127");
        Location gregsOffice = new Location ("a spinning vortex of terror", "Greg's Office");

        // Connect Locations
        startUp.addExit("south",  new Exit ("you see an open space to the south", lounge));
        lounge.addExit("north", new Exit("you see a mound of paper to the north", startUp));
        startUp.addExit("west", new Exit("you see a terrifying office to the west", gregsOffice));
        gregsOffice.addExit("east", new Exit("you see a mound of paper to the east", startUp));
        t127.addExit("south", new Exit("you see a mound of paper to the south", startUp));
        startUp.addExit("north", new Exit("you see a bleak place to the north", t127));
        lounge.addExit("northwest", new Exit("you see a terrifying office to the northwest", gregsOffice));
        gregsOffice.addExit("southeast", new Exit("you see an open space to the southeast", lounge));
 
    }
}
SimpleConsoleClient.java
SimpleConsoleClient.java
package mazegame;
import java.util.Scanner;
import mazegame.boundary.IMazeClient;
public class SimpleConsoleClient implements IMazeClient {

    public String getReply (String question)
    {

        System.out.println("\n" + question + " ");
        Scanner in = new Scanner (System.in);
        return in.nextLine();
    }

    public void playerMessage (String message)
    {
        System.out.print(message);

    }
}
boundary/IMazeClient.java
boundary/IMazeClient.java
package mazegame.boundary;
public interface IMazeClient {
    public String getReply (String question);
    public void playerMessage (String message);
}
boundary/IMazeData.java
boundary/IMazeData.java
package mazegame.boundary;
import mazegame.entity.Location;
public interface IMazeData {
    Location getStartingLocation();
    String getWelcomeMessage();
}
control/DungeonMaster.java
control/DungeonMaster.java
package mazegame.control;
import java.io.IOException;
import mazegame.SimpleConsoleClient;
import mazegame.boundary.IMazeClient;
import mazegame.boundary.IMazeData;
import mazegame.entity.Player;
public class DungeonMaster {
    private IMazeClient gameClient;
    private IMazeData gameData;
    private Player thePlayer;

     public DungeonMaster(IMazeData gameData, IMazeClient gameClient)
     {
         this.gameData = gameData;
         this.gameClient = gameClient;
     }
     public void printWelcome()
     {
         gameClient.playerMessage(gameData.getWelcomeMessage());
     }
     public void setupPlayer()
     {
         String playerName = gameClient.getReply("What name do you choose to be known by?");
         thePlayer = new Player(playerName);
         gameClient.playerMessage("Welcome " + playerName + "\n\n");
         gameClient.playerMessage("You find yourself looking at ");
         gameClient.playerMessage(gameData.getStartingLocation().getDescription());
         gameClient.getReply("<>");
     }
     public void runGame()
     {
         printWelcome();
         setupPlayer();
     }
}
control/MazeGame.java
control/MazeGame.java
package mazegame.control;
import mazegame.HardCodedData;
import mazegame.SimpleCon...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here