Map - JayhawkZombie/EECS581Project GitHub Wiki

##Abstract At this point, Map is a 2d collection of terrains

##Derives From Map does not derive from anything

##MemberVariables

  • int length; //should always be 9
  • int width; //should always be 9
  • int startLocX;
  • int startLocY;
    • This is where the player enters the map
  • int curLocX;
  • int curLocY;
    • This is the current location of the player
  • int prevLocX;
  • int prevLocY;
    • Later this information will be stored more conveniently in the actor class for when we have more actors
  • Terrain[][] content;
  • static int num; //holds the number of maps
  • static Map[] allMaps;

##Functions

  • public int transverse()
    • Handles moving around the map
  • public void printPlace()//console
    • Writes the map to the screen for the console implementation
  • public void printChoices()//console
    • Writes the possible choices to the map for the console implementation
  • public void tryMove(int Direction)
    • attempts to move in a particular direction -used by the transverse() function
  • public void move(int direction)
    • actually moves in the direction indicated by tryMove after check has been completed

##JavaImplementation The Java Implementation is a good place to start, but it bears mentioning that we will only be printing 'agile' in this iteration of the project

##Future Plans Move the 'place' ints to the actor class where they belong, so we can handle multiple actors at once (NPC's moving around)