new RealEstateProfiles()
Container object used as the parameter for the Campaign method realEstateAgent.
Container class (behaves like a List).
The parameter in the company.realEstateAgent function. Before looping through the objects of RealEstateProfile you probably want to use one of the sortBy* methods in this class.
If many players are in the game there will more than one city. In this case you can loop through the citiesToRestaurants property to see how many restaurants are in each city. Keep in mind that a city has only a certain number of guests, thus the more restaurants are in a city the more competitive struggle there is. After sorting you should use lowest/highest attribute to access an element.
The parameter in the company.realEstateAgent function. Before looping through the objects of RealEstateProfile you probably want to use one of the sortBy* methods in this class.
If many players are in the game there will more than one city. In this case you can loop through the citiesToRestaurants property to see how many restaurants are in each city. Keep in mind that a city has only a certain number of guests, thus the more restaurants are in a city the more competitive struggle there is. After sorting you should use lowest/highest attribute to access an element.
- Source:
- RealEstateProfiles.js
Members
-
citiesToRestaurants :List
-
Type:
- Source:
- RealEstateProfiles.js
-
lowest :RealEstateProfile
-
Holds the lowest value element in the list if priorly sorted. Read-Only.
Type:
- Source:
- RealEstateProfiles.js
-
highest :RealEstateProfile
-
Holds the highest value element in the list if priorly sorted. Read-Only.
Type:
- Source:
- RealEstateProfiles.js
Methods
-
iterator()
-
Java-like iterator to loop over all RealEstateProfiles within this presentation.
- Source:
- RealEstateProfiles.js
Returns:
An iterator to loop- Type
- Iterator
-
get(index)
-
Returns a RealEstateProfile object at the index
Parameters:
Name Type Description index
Number index number to get - Source:
- RealEstateProfiles.js
Returns:
the element at the position index- Type
- RealEstateProfile
-
sortByLeaseCost()
-
Sorts the list by lease cost with ascending order and returns the RealEstateProfiles object itself
- Source:
- RealEstateProfiles.js
Returns:
returns self- Type
- RealEstateProfiles
-
sortBySalePrice()
-
Sorts the list by sales price with ascending order and returns the RealEstateProfiles object itself
- Source:
- RealEstateProfiles.js
Returns:
returns self- Type
- RealEstateProfiles
-
sortByLocationQuality()
-
Sorts the list by location quality with ascending order and returns the RealEstateProfiles object itself
- Source:
- RealEstateProfiles.js
Returns:
returns self- Type
- RealEstateProfiles
-
sortByLocationSize()
-
Sorts the list by location size with ascending order and returns the RealEstateProfiles object itself
- Source:
- RealEstateProfiles.js
Returns:
returns self- Type
- RealEstateProfiles
-
size()
-
Returns the list size
- Source:
- RealEstateProfiles.js
Returns:
the list size- Type
- Number
-
each(forEachElement)
-
JavaScript-like callback to loop over all RealEstateProfile within this call.
Parameters:
Name Type Description forEachElement
function Will be called for each available RealEstateProfile. Needs to have one parameter. - Source:
- RealEstateProfiles.js