com.TeamHEC.LocomotionCommotion.Map
Class MapObj

java.lang.Object
  extended by com.TeamHEC.LocomotionCommotion.Map.MapObj
Direct Known Subclasses:
Junction, Station

public class MapObj
extends java.lang.Object

Author:
Matthew Taylor

Field Summary
 Game_Map_MapObj actor
           
 java.util.ArrayList<Connection> connections
           
 float x
           
 float y
           
 
Constructor Summary
MapObj(float x, float y, java.lang.String name)
          Every Station and Junction on the map
 
Method Summary
 Game_Map_MapObj getActor()
           
 java.lang.String getName()
          Returns the name of the station or junction the MapObj represents
 Station getStation()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actor

public Game_Map_MapObj actor

connections

public java.util.ArrayList<Connection> connections

x

public float x

y

public float y
Constructor Detail

MapObj

public MapObj(float x,
              float y,
              java.lang.String name)
Every Station and Junction on the map

Parameters:
x - xPosition on map
y - yPosition on map
Method Detail

getName

public java.lang.String getName()
Returns the name of the station or junction the MapObj represents


getStation

public Station getStation()
Returns:
returns null if not a station, or is overwritten by Station subclass

getActor

public Game_Map_MapObj getActor()
Returns:
The Actor (UI element) associated with the MapObj