Package model.common
Class HumanManufacture
java.lang.Object
model.common.HumanManufacture
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Returns a young citizen, assigns it to a random residential zone (if available), and to the closest workPlace (if available)static void
createYoungCitizen
(GameModel gm, Zone workPlace, Zone livingPlace) Creates a young citizen with workPlace and livingPlace given.getAvailableSchools
(GameModel gm, Zone livingPlace) static ArrayList<University>
getAvailableUniversities
(GameModel gm, Zone livingPlace) static Zone
getClosestWorkingPlace
(ArrayList<Zone> availableWorkingZones, Zone livingPlace, GameModel gm) Getting the closest working place (zone) from the available ones.static LevelOfEducation
getEducationLevel
(GameModel gm, Zone livingPlace) Returns a random available level of education.static Zone
Getting an available random Residential zone.static Zone
getWorkingPlace
(GameModel gm, Zone livingPlace) Gets a working place that is connects to the giving living place.
-
Field Details
-
startingNrCitizens
public static int startingNrCitizens
-
-
Constructor Details
-
HumanManufacture
public HumanManufacture()
-
-
Method Details
-
getLivingPlace
Getting an available random Residential zone.- Parameters:
gm
- game model- Returns:
- Residential zone if found, otherwise null.
-
getClosestWorkingPlace
public static Zone getClosestWorkingPlace(ArrayList<Zone> availableWorkingZones, Zone livingPlace, GameModel gm) Getting the closest working place (zone) from the available ones.- Parameters:
availableWorkingZones
- in list of work zones which still have empty capacitylivingPlace
- living place of the citizen.gm
- game model- Returns:
- closest working place (zone) if found, otherwise null.
-
getEducationLevel
Returns a random available level of education.- Parameters:
gm
- game model- Returns:
- the random education level
-
createYoungCitizen
Returns a young citizen, assigns it to a random residential zone (if available), and to the closest workPlace (if available)- Parameters:
gm
- game model
-
createYoungCitizen
Creates a young citizen with workPlace and livingPlace given.- Parameters:
gm
- game modelworkPlace
- working zone for the new citizenlivingPlace
- living zone for the new citizen
-
getWorkingPlace
Gets a working place that is connects to the giving living place.- Parameters:
gm
- game modellivingPlace
- living place to the work place- Returns:
- a working place which is connected to the living place.
-
getAvailableSchools
-
getAvailableUniversities
-