Package breitband.game.board
Class CableRoute
- java.lang.Object
-
- breitband.game.board.CableRoute
-
public class CableRoute extends java.lang.Object
Class for Routes between Cities (similar to a struct in C)- Author:
- Klara Schöbel
-
-
Constructor Summary
Constructors Constructor Description CableRoute(CableConfig cableType, City cityA, City cityB)
Constructs a cable-route between to cities with a certain cable-type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description City
getCityA()
getter for cityACity
getCityB()
getter for cityBint
getDistance()
getter for the distanceint
getNum()
getter for numCableConfig
getType()
getter for cableTypeint
getVal()
getter for value
-
-
-
Constructor Detail
-
CableRoute
public CableRoute(CableConfig cableType, City cityA, City cityB)
Constructs a cable-route between to cities with a certain cable-type- Parameters:
cableType
- cable(-type) this route is built with (see alsogetType()
)cityA
- "starting" point of this route (see alsogetCityA()
)cityB
- "ending" point of this route (see alsogetCityB()
)
-
-
Method Detail
-
getType
public CableConfig getType()
getter for cableType- Returns:
- the Cable object holding all the information on this particular cable(-type)
-
getNum
public int getNum()
getter for num- Returns:
- number of cables in this route
-
getVal
public int getVal()
getter for value- Returns:
- the value of the entire route
-
getCityA
public City getCityA()
getter for cityA- Returns:
- the "starting" city
-
getCityB
public City getCityB()
getter for cityB- Returns:
- the "ending" city
-
getDistance
public int getDistance()
getter for the distance- Returns:
- distance this route covers
-
-