Methapolis
0.27
|
Classes | |
class | FinancialHistory |
class | History |
interface | Listener |
Public Member Functions | |
void | spend (int amount, PlayerInfo playerInfo) |
void | spend (int amount) |
Micropolis () | |
Micropolis (int width, int height) | |
List< Sprite > | getSprites () |
void | fireFundsChanged () |
void | addListener (Listener l) |
void | removeListener (Listener l) |
void | addEarthquakeListener (EarthquakeListener l) |
void | removeEarthquakeListener (EarthquakeListener l) |
void | addMapListener (MapListener l) |
void | removeMapListener (MapListener l) |
void | addTempelListener (TempelListener listener) |
void | notifyCountdown (int countdown) |
void | notifyEnd () |
int | getWidth () |
int | getHeight () |
char | getTile (int xpos, int ypos) |
char | getTileRaw (int xpos, int ypos) |
boolean | isTilePowered (int xpos, int ypos) |
void | setTile (int xpos, int ypos, char newTile) |
void | setTile (int xpos, int ypos, char newTile, int playerID) |
final boolean | testBounds (int xpos, int ypos) |
boolean | isBudgetTime () |
void | calculateCenterMass () |
int | getFireStationCoverage (int xpos, int ypos) |
int | getLandValue (int xpos, int ypos) |
int | getTrafficDensity (int xpos, int ypos) |
CityLocation | getLocationOfMaxPollution () |
void | addResearchPoints () |
void | addResearchPoints (int playerID) |
BudgetNumbers | generateBudget () |
BudgetNumbers | generateBudget (PlayerInfo playerInfo) |
void | load (File filename) throws IOException |
void | load (InputStream inStream) throws IOException |
void | save (File filename) throws IOException |
void | save (OutputStream outStream) throws IOException |
void | toggleAutoBudget () |
void | toggleAutoBulldoze () |
void | toggleDisasters () |
void | setSpeed (Speed newSpeed) |
void | animate () |
Sprite[] | allSprites () |
int | getCityPopulation () |
int | getCityPopulation (int playerID) |
void | makeEarthquake () |
void | makeFire () |
boolean | makeMeltdown () |
void | makeMonster () |
void | makeTornado () |
void | makeFlood () |
ZoneStatus | queryZoneStatus (int xpos, int ypos) |
int | getResValve () |
int | getComValve () |
int | getIndValve () |
void | setGameLevel (int newLevel) |
void | setFunds (int totalFunds) |
int | getPlayerID () |
void | setBudgetNumbers (int newTaxRate, double roadPct, double newRoadPct, double newPolicePct, double newFirePct, double newResearchPct) |
int | getNumberOfPlayers () |
PlayerInfo | getPlayerInfo () |
PlayerInfo | getPlayerInfo (int playerID) |
Public Attributes | |
int[][] | pollutionMem |
int[][] | crimeMem |
int[][] | popDensity |
int[][] | rateOGMem |
int[][] | fireRate |
int[][] | policeMapEffect |
int[][] | researchMapEffect |
PlayerInfo | playerInfo |
Stack< CityLocation > | powerPlants = new Stack<CityLocation>() |
boolean | autoBulldoze = true |
boolean | autoBudget = false |
Speed | simSpeed = Speed.NORMAL |
boolean | noDisasters = true |
int | gameLevel |
int | cityTime |
MainWindow | mainWindow |
History | history = new History() |
ArrayList< FinancialHistory > | financialHistory = new ArrayList<FinancialHistory>() |
Static Public Attributes | |
static final int | CENSUSRATE = 4 |
Protected Member Functions | |
void | init (int width, int height) |
void | fireCensusChanged () |
void | fireCityMessage (MicropolisMessage message, CityLocation loc) |
void | fireDemandChanged () |
void | fireEvaluationChanged () |
void | fireMapOverlayDataChanged (MapState overlayDataType) |
void | fireTileChanged (int xpos, int ypos) |
void | fireWholeMapChanged () |
void | mapScan (int x0, int x1) |
void | takeCensus () |
void | takeCensus2 () |
void | moveObjects () |
void | animateTiles () |
Protected Attributes | |
char[][] | map |
List< Sprite > | sprites = new ArrayList<Sprite>() |
Private Member Functions | |
int | computePopDen (int x, int y, char tile) |
void | popDenScan () |
void | distIntMarket () |
void | decROGMem () |
void | decTrafficMem () |
int[][] | smoothFirePoliceMap (int[][] omap) |
boolean | testForCond (CityLocation loc, int dir) |
boolean | movePowerLocation (CityLocation loc, int dir) |
Static Private Member Functions | |
static int[][] | doSmooth (int[][] tem) |
Private Attributes | |
int | powerPlayer = 0 |
The main simulation engine for Micropolis. The front-end should call animate() periodically to move the simulation forward in time.
Definition at line 70 of file Micropolis.java.
micropolisj.engine.Micropolis.Micropolis | ( | ) |
Definition at line 203 of file Micropolis.java.
micropolisj.engine.Micropolis.Micropolis | ( | int | width, |
int | height | ||
) |
Definition at line 210 of file Micropolis.java.
References micropolisj.engine.Micropolis.init(), and micropolisj.engine.Micropolis.playerInfo.
void micropolisj.engine.Micropolis.addEarthquakeListener | ( | EarthquakeListener | l | ) |
Definition at line 338 of file Micropolis.java.
Referenced by micropolisj.gui.MainWindow.MainWindow(), and micropolisj.gui.MainWindow.setEngine().
void micropolisj.engine.Micropolis.addListener | ( | Listener | l | ) |
Definition at line 330 of file Micropolis.java.
Referenced by micropolisj.gui.GraphsPane.GraphsPane(), micropolisj.gui.MainWindow.MainWindow(), micropolisj.gui.DemandIndicator.setEngine(), micropolisj.gui.EvaluationPane.setEngine(), micropolisj.gui.GraphsPane.setEngine(), and micropolisj.gui.MainWindow.setEngine().
void micropolisj.engine.Micropolis.addMapListener | ( | MapListener | l | ) |
Definition at line 346 of file Micropolis.java.
Referenced by micropolisj.gui.MicropolisDrawingArea.MicropolisDrawingArea(), micropolisj.gui.OverlayMapView.setEngine(), and micropolisj.gui.MicropolisDrawingArea.setEngine().
void micropolisj.engine.Micropolis.addResearchPoints | ( | ) |
Definition at line 1640 of file Micropolis.java.
void micropolisj.engine.Micropolis.addResearchPoints | ( | int | playerID | ) |
Definition at line 1644 of file Micropolis.java.
References micropolisj.engine.Micropolis.getCityPopulation(), micropolisj.engine.Micropolis.getPlayerInfo(), micropolisj.research.ResearchState.refreshPanel(), micropolisj.engine.PlayerInfo.researchEffect, micropolisj.research.ResearchState.researchPoints, and micropolisj.engine.PlayerInfo.researchState.
void micropolisj.engine.Micropolis.addTempelListener | ( | TempelListener | listener | ) |
Definition at line 358 of file Micropolis.java.
Referenced by micropolisj.gui.MainWindow.MainWindow().
Sprite [] micropolisj.engine.Micropolis.allSprites | ( | ) |
Definition at line 2149 of file Micropolis.java.
Referenced by micropolisj.engine.TornadoSprite.moveImpl(), micropolisj.engine.AirplaneSprite.moveImpl(), micropolisj.engine.MonsterSprite.moveImpl(), micropolisj.engine.Micropolis.moveObjects(), and micropolisj.gui.MicropolisDrawingArea.paintComponent().
void micropolisj.engine.Micropolis.animate | ( | ) |
Reimplemented in micropolisj.network.ServerMicropolis, and micropolisj.network.ClientMicropolis.
Definition at line 2136 of file Micropolis.java.
References micropolisj.engine.Micropolis.animateTiles(), micropolisj.engine.Micropolis.getNumberOfPlayers(), and micropolisj.engine.Micropolis.moveObjects().
Referenced by micropolisj.gui.MainWindow.startTimer().
|
protected |
Definition at line 2162 of file Micropolis.java.
References micropolisj.engine.Tiles.get(), micropolisj.engine.Micropolis.map, and micropolisj.engine.Micropolis.setTile().
Referenced by micropolisj.network.ClientMicropolis.animate(), and micropolisj.engine.Micropolis.animate().
void micropolisj.engine.Micropolis.calculateCenterMass | ( | ) |
Definition at line 679 of file Micropolis.java.
References micropolisj.engine.Micropolis.popDenScan().
Referenced by micropolisj.gui.OverlayMapView.setEngine(), and micropolisj.gui.OverlayMapView.wholeMapChanged().
|
private |
Definition at line 637 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.popDenScan().
|
private |
Definition at line 745 of file Micropolis.java.
References micropolisj.engine.Micropolis.rateOGMem.
|
private |
Definition at line 772 of file Micropolis.java.
|
private |
Definition at line 733 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.popDenScan().
|
staticprivate |
Definition at line 653 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.popDenScan().
|
protected |
Definition at line 254 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.fireEvents().
|
protected |
Definition at line 260 of file Micropolis.java.
|
protected |
Definition at line 272 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.fireEvents(), and micropolisj.engine.Micropolis.load().
|
protected |
Definition at line 284 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.fireEvents().
void micropolisj.engine.Micropolis.fireFundsChanged | ( | ) |
Definition at line 290 of file Micropolis.java.
Referenced by micropolisj.gui.CheatWindow.dispatchKeyEvent(), micropolisj.network.ClientMicropolis.fireEvents(), micropolisj.engine.Micropolis.load(), and micropolisj.engine.Micropolis.spend().
|
protected |
Definition at line 296 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.popDenScan().
|
protected |
Definition at line 314 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.applyMapInfo(), and micropolisj.engine.Micropolis.setTile().
|
protected |
Definition at line 320 of file Micropolis.java.
Referenced by micropolisj.engine.MapGenerator.generateSomeCity(), and micropolisj.engine.Micropolis.load().
BudgetNumbers micropolisj.engine.Micropolis.generateBudget | ( | ) |
Definition at line 1728 of file Micropolis.java.
References micropolisj.engine.Micropolis.playerInfo.
Referenced by micropolisj.gui.BudgetDialog.loadBudgetNumbers().
BudgetNumbers micropolisj.engine.Micropolis.generateBudget | ( | PlayerInfo | playerInfo | ) |
Calculate the current playerInfo.budget numbers.
Definition at line 1735 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.budget, micropolisj.engine.PlayerInfo.cityTax, micropolisj.engine.BudgetNumbers.fireFunded, micropolisj.engine.BudgetNumbers.firePercent, micropolisj.engine.PlayerInfo.firePercent, micropolisj.engine.BudgetNumbers.fireRequest, micropolisj.engine.Micropolis.gameLevel, micropolisj.engine.PlayerInfo.landValueAverage, micropolisj.engine.PlayerInfo.lastFireStationCount, micropolisj.engine.PlayerInfo.lastPoliceCount, micropolisj.engine.PlayerInfo.lastRailTotal, micropolisj.engine.PlayerInfo.lastResearchCount, micropolisj.engine.PlayerInfo.lastRoadTotal, micropolisj.engine.PlayerInfo.lastTotalPop, micropolisj.engine.BudgetNumbers.newBalance, micropolisj.engine.BudgetNumbers.operatingExpenses, micropolisj.engine.BudgetNumbers.policeFunded, micropolisj.engine.BudgetNumbers.policePercent, micropolisj.engine.PlayerInfo.policePercent, micropolisj.engine.BudgetNumbers.policeRequest, micropolisj.engine.BudgetNumbers.previousBalance, micropolisj.engine.BudgetNumbers.researchFunded, micropolisj.engine.BudgetNumbers.researchPercent, micropolisj.engine.PlayerInfo.researchPercent, micropolisj.engine.BudgetNumbers.researchRequest, micropolisj.engine.BudgetNumbers.roadFunded, micropolisj.engine.BudgetNumbers.roadPercent, micropolisj.engine.PlayerInfo.roadPercent, micropolisj.engine.BudgetNumbers.roadRequest, micropolisj.engine.BudgetNumbers.taxIncome, micropolisj.engine.BudgetNumbers.taxRate, and micropolisj.engine.CityBudget.totalFunds.
int micropolisj.engine.Micropolis.getCityPopulation | ( | ) |
Definition at line 2175 of file Micropolis.java.
References micropolisj.engine.Micropolis.getPlayerID().
Referenced by micropolisj.engine.Micropolis.addResearchPoints().
int micropolisj.engine.Micropolis.getCityPopulation | ( | int | playerID | ) |
Definition at line 2179 of file Micropolis.java.
References micropolisj.engine.Micropolis.getPlayerInfo(), and micropolisj.engine.PlayerInfo.lastCityPop.
int micropolisj.engine.Micropolis.getComValve | ( | ) |
Definition at line 2643 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.comValve, and micropolisj.engine.Micropolis.getPlayerInfo().
Referenced by micropolisj.gui.DemandIndicator.paintComponent().
int micropolisj.engine.Micropolis.getFireStationCoverage | ( | int | xpos, |
int | ypos | ||
) |
Accessor method for fireRate[].
Definition at line 1050 of file Micropolis.java.
References micropolisj.engine.Micropolis.fireRate.
int micropolisj.engine.Micropolis.getHeight | ( | ) |
Definition at line 418 of file Micropolis.java.
References micropolisj.engine.Micropolis.map.
Referenced by micropolisj.gui.OverlayMapView.getPreferredSize(), micropolisj.gui.MicropolisDrawingArea.getPreferredSize(), micropolisj.engine.HelicopterSprite.HelicopterSprite(), micropolisj.engine.Micropolis.makeEarthquake(), micropolisj.engine.Micropolis.makeFire(), micropolisj.engine.Micropolis.makeFlood(), micropolisj.engine.Micropolis.makeMonster(), micropolisj.engine.Micropolis.makeTornado(), micropolisj.engine.Micropolis.mapScan(), micropolisj.engine.MonsterSprite.MonsterSprite(), micropolisj.engine.AirplaneSprite.moveImpl(), micropolisj.engine.Micropolis.movePowerLocation(), micropolisj.gui.MicropolisDrawingArea.paintComponent(), micropolisj.gui.OverlayMapView.paintComponent(), micropolisj.engine.Micropolis.popDenScan(), and micropolisj.engine.Micropolis.testBounds().
int micropolisj.engine.Micropolis.getIndValve | ( | ) |
Definition at line 2647 of file Micropolis.java.
References micropolisj.engine.Micropolis.getPlayerInfo(), and micropolisj.engine.PlayerInfo.indValve.
Referenced by micropolisj.gui.DemandIndicator.paintComponent().
int micropolisj.engine.Micropolis.getLandValue | ( | int | xpos, |
int | ypos | ||
) |
Accessor method for landValueMem overlay.
Definition at line 1055 of file Micropolis.java.
References micropolisj.engine.Micropolis.testBounds().
Referenced by micropolisj.gui.OverlayMapView.checkLandValueOverlay().
CityLocation micropolisj.engine.Micropolis.getLocationOfMaxPollution | ( | ) |
Definition at line 1175 of file Micropolis.java.
References micropolisj.engine.Micropolis.playerInfo, micropolisj.engine.PlayerInfo.pollutionMaxLocationX, and micropolisj.engine.PlayerInfo.pollutionMaxLocationY.
Referenced by micropolisj.engine.MonsterSprite.MonsterSprite().
int micropolisj.engine.Micropolis.getNumberOfPlayers | ( | ) |
Reimplemented in micropolisj.network.ServerMicropolis.
Definition at line 2674 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.animate().
int micropolisj.engine.Micropolis.getPlayerID | ( | ) |
Reimplemented in micropolisj.network.ClientMicropolis.
Definition at line 2662 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.getCityPopulation(), micropolisj.engine.Micropolis.getPlayerInfo(), micropolisj.engine.ToolStroke.ToolStroke(), and micropolisj.gui.MainWindow.updateDateLabel().
PlayerInfo micropolisj.engine.Micropolis.getPlayerInfo | ( | ) |
Reimplemented in micropolisj.network.ServerMicropolis.
Definition at line 2678 of file Micropolis.java.
References micropolisj.engine.Micropolis.playerInfo.
Referenced by micropolisj.research.ResearchState.actionPerformed(), micropolisj.engine.Micropolis.addResearchPoints(), micropolisj.gui.CheatWindow.dispatchKeyEvent(), micropolisj.gui.OverlayMapView.dragViewToCityCenter(), micropolisj.engine.RocketSprite.explodeSprite(), micropolisj.engine.Micropolis.getCityPopulation(), micropolisj.engine.Micropolis.getComValve(), micropolisj.engine.Micropolis.getIndValve(), micropolisj.engine.Micropolis.getResValve(), micropolisj.gui.BudgetDialog.loadBudgetNumbers(), micropolisj.gui.EvaluationPane.loadEvaluation(), micropolisj.gui.MainWindow.MainWindow(), micropolisj.gui.NewCityDialog.NewCityDialog(), micropolisj.gui.BudgetDialog.onResetClicked(), micropolisj.engine.Micropolis.setBudgetNumbers(), and micropolisj.engine.Micropolis.setFunds().
PlayerInfo micropolisj.engine.Micropolis.getPlayerInfo | ( | int | playerID | ) |
Reimplemented in micropolisj.network.ClientMicropolis, and micropolisj.network.ServerMicropolis.
Definition at line 2682 of file Micropolis.java.
References micropolisj.engine.Micropolis.getPlayerID(), and micropolisj.engine.Micropolis.playerInfo.
int micropolisj.engine.Micropolis.getResValve | ( | ) |
Definition at line 2639 of file Micropolis.java.
References micropolisj.engine.Micropolis.getPlayerInfo(), and micropolisj.engine.PlayerInfo.resValve.
Referenced by micropolisj.gui.DemandIndicator.paintComponent().
List<Sprite> micropolisj.engine.Micropolis.getSprites | ( | ) |
Definition at line 250 of file Micropolis.java.
References micropolisj.engine.Micropolis.sprites.
char micropolisj.engine.Micropolis.getTile | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 422 of file Micropolis.java.
References micropolisj.engine.Micropolis.map.
Referenced by micropolisj.engine.Sprite.getChar(), micropolisj.engine.Micropolis.makeEarthquake(), micropolisj.engine.Micropolis.makeFire(), micropolisj.engine.Micropolis.makeFlood(), micropolisj.engine.Micropolis.makeMeltdown(), micropolisj.engine.Micropolis.makeMonster(), micropolisj.engine.ShipSprite.moveImpl(), micropolisj.gui.MicropolisDrawingArea.paintComponent(), micropolisj.gui.OverlayMapView.paintComponent(), micropolisj.engine.Micropolis.popDenScan(), micropolisj.engine.Micropolis.queryZoneStatus(), and micropolisj.engine.Micropolis.testForCond().
char micropolisj.engine.Micropolis.getTileRaw | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 426 of file Micropolis.java.
References micropolisj.engine.Micropolis.map.
Referenced by micropolisj.engine.Micropolis.isTilePowered(), and micropolisj.engine.TileBehavior.processTile().
int micropolisj.engine.Micropolis.getTrafficDensity | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 1064 of file Micropolis.java.
References micropolisj.engine.Micropolis.testBounds().
Referenced by micropolisj.gui.OverlayMapView.checkTrafficOverlay(), and micropolisj.engine.HelicopterSprite.moveImpl().
int micropolisj.engine.Micropolis.getWidth | ( | ) |
Definition at line 414 of file Micropolis.java.
References micropolisj.engine.Micropolis.map.
Referenced by micropolisj.engine.AirplaneSprite.AirplaneSprite(), micropolisj.gui.OverlayMapView.getPreferredSize(), micropolisj.gui.MicropolisDrawingArea.getPreferredSize(), micropolisj.engine.HelicopterSprite.HelicopterSprite(), micropolisj.engine.Micropolis.makeEarthquake(), micropolisj.engine.Micropolis.makeFire(), micropolisj.engine.Micropolis.makeFlood(), micropolisj.engine.Micropolis.makeMonster(), micropolisj.engine.Micropolis.makeTornado(), micropolisj.engine.MonsterSprite.MonsterSprite(), micropolisj.engine.AirplaneSprite.moveImpl(), micropolisj.engine.Micropolis.movePowerLocation(), micropolisj.gui.MicropolisDrawingArea.paintComponent(), micropolisj.gui.OverlayMapView.paintComponent(), and micropolisj.engine.Micropolis.popDenScan().
|
protected |
Definition at line 217 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.centerMassX, micropolisj.engine.PlayerInfo.centerMassY, micropolisj.engine.Micropolis.crimeMem, micropolisj.engine.Micropolis.fireRate, micropolisj.engine.Micropolis.map, micropolisj.engine.Micropolis.playerInfo, micropolisj.engine.Micropolis.policeMapEffect, micropolisj.engine.Micropolis.pollutionMem, micropolisj.engine.Micropolis.popDensity, and micropolisj.engine.Micropolis.rateOGMem.
Referenced by micropolisj.engine.Micropolis.Micropolis().
boolean micropolisj.engine.Micropolis.isBudgetTime | ( | ) |
Checks whether the next call to animate() will collect taxes and process the playerInfo.budget.
Definition at line 482 of file Micropolis.java.
References micropolisj.engine.Micropolis.cityTime.
Referenced by micropolisj.gui.MainWindow.startTimer().
boolean micropolisj.engine.Micropolis.isTilePowered | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 452 of file Micropolis.java.
References micropolisj.engine.Micropolis.getTileRaw().
Referenced by micropolisj.gui.MicropolisDrawingArea.paintComponent().
void micropolisj.engine.Micropolis.load | ( | File | filename | ) | throws IOException |
Definition at line 2042 of file Micropolis.java.
Referenced by micropolisj.gui.NewCityDialog.onLoadCityClicked(), and micropolisj.gui.MainWindow.onLoadGameClicked().
void micropolisj.engine.Micropolis.load | ( | InputStream | inStream | ) | throws IOException |
Definition at line 2079 of file Micropolis.java.
References micropolisj.engine.Micropolis.fireDemandChanged(), micropolisj.engine.Micropolis.fireFundsChanged(), micropolisj.engine.Micropolis.fireWholeMapChanged(), and micropolisj.engine.Micropolis.history.
void micropolisj.engine.Micropolis.makeEarthquake | ( | ) |
Definition at line 2188 of file Micropolis.java.
References micropolisj.engine.MicropolisMessage.EARTHQUAKE_REPORT, micropolisj.engine.Sound.EXPLOSION_LOW, micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.Micropolis.setTile(), and micropolisj.engine.Micropolis.testBounds().
Referenced by micropolisj.gui.MainWindow.onInvokeDisasterClicked().
void micropolisj.engine.Micropolis.makeFire | ( | ) |
Definition at line 2222 of file Micropolis.java.
References micropolisj.engine.MicropolisMessage.FIRE_REPORT, micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getWidth(), and micropolisj.engine.Micropolis.setTile().
Referenced by micropolisj.gui.MainWindow.onInvokeDisasterClicked().
void micropolisj.engine.Micropolis.makeFlood | ( | ) |
Definition at line 2313 of file Micropolis.java.
References micropolisj.engine.MicropolisMessage.FLOOD_REPORT, micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.Micropolis.map, micropolisj.engine.Micropolis.setTile(), and micropolisj.engine.Micropolis.testBounds().
Referenced by micropolisj.gui.MainWindow.onInvokeDisasterClicked().
boolean micropolisj.engine.Micropolis.makeMeltdown | ( | ) |
Force a meltdown to occur.
Definition at line 2243 of file Micropolis.java.
References micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.map, micropolisj.engine.CityLocation.x, and micropolisj.engine.CityLocation.y.
void micropolisj.engine.Micropolis.makeMonster | ( | ) |
Definition at line 2264 of file Micropolis.java.
References micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getWidth(), and micropolisj.engine.SpriteKind.GOD.
Referenced by micropolisj.gui.MainWindow.onInvokeDisasterClicked().
void micropolisj.engine.Micropolis.makeTornado | ( | ) |
Definition at line 2297 of file Micropolis.java.
References micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.SpriteKind.TOR, and micropolisj.engine.MicropolisMessage.TORNADO_REPORT.
Referenced by micropolisj.gui.MainWindow.onInvokeDisasterClicked().
|
protected |
Definition at line 1395 of file Micropolis.java.
References micropolisj.engine.Micropolis.getHeight().
|
protected |
Definition at line 2153 of file Micropolis.java.
References micropolisj.engine.Micropolis.allSprites().
Referenced by micropolisj.network.ClientMicropolis.animate(), and micropolisj.engine.Micropolis.animate().
|
private |
Definition at line 929 of file Micropolis.java.
References micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.CityLocation.x, and micropolisj.engine.CityLocation.y.
Referenced by micropolisj.engine.Micropolis.testForCond().
void micropolisj.engine.Micropolis.notifyCountdown | ( | int | countdown | ) |
Definition at line 362 of file Micropolis.java.
References micropolisj.engine.TempelListener.onCountdown().
void micropolisj.engine.Micropolis.notifyEnd | ( | ) |
Definition at line 367 of file Micropolis.java.
References micropolisj.engine.TempelListener.onEnd().
|
private |
Definition at line 683 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.centerMassX, micropolisj.engine.PlayerInfo.centerMassY, micropolisj.engine.Micropolis.computePopDen(), micropolisj.engine.Micropolis.distIntMarket(), micropolisj.engine.Micropolis.doSmooth(), micropolisj.engine.Micropolis.fireMapOverlayDataChanged(), micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.MapState.GROWTHRATE_OVERLAY, micropolisj.engine.Micropolis.playerInfo, micropolisj.engine.MapState.POPDEN_OVERLAY, and micropolisj.engine.Micropolis.popDensity.
Referenced by micropolisj.engine.Micropolis.calculateCenterMass().
ZoneStatus micropolisj.engine.Micropolis.queryZoneStatus | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 2614 of file Micropolis.java.
References micropolisj.engine.ZoneStatus.building, micropolisj.engine.ZoneStatus.crimeLevel, micropolisj.engine.Micropolis.crimeMem, micropolisj.engine.Micropolis.getTile(), micropolisj.engine.ZoneStatus.growthRate, micropolisj.engine.ZoneStatus.landValue, micropolisj.engine.ZoneStatus.pollution, micropolisj.engine.Micropolis.pollutionMem, micropolisj.engine.ZoneStatus.popDensity, and micropolisj.engine.Micropolis.rateOGMem.
void micropolisj.engine.Micropolis.removeEarthquakeListener | ( | EarthquakeListener | l | ) |
Definition at line 342 of file Micropolis.java.
Referenced by micropolisj.gui.MainWindow.setEngine().
void micropolisj.engine.Micropolis.removeListener | ( | Listener | l | ) |
Definition at line 334 of file Micropolis.java.
Referenced by micropolisj.gui.DemandIndicator.setEngine(), micropolisj.gui.EvaluationPane.setEngine(), micropolisj.gui.GraphsPane.setEngine(), and micropolisj.gui.MainWindow.setEngine().
void micropolisj.engine.Micropolis.removeMapListener | ( | MapListener | l | ) |
Definition at line 350 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.setEngine(), and micropolisj.gui.MicropolisDrawingArea.setEngine().
void micropolisj.engine.Micropolis.save | ( | File | filename | ) | throws IOException |
Definition at line 2099 of file Micropolis.java.
Referenced by micropolisj.gui.MainWindow.onSaveCityAsClicked(), and micropolisj.gui.MainWindow.onSaveCityClicked().
void micropolisj.engine.Micropolis.save | ( | OutputStream | outStream | ) | throws IOException |
Definition at line 2103 of file Micropolis.java.
References micropolisj.engine.Micropolis.history.
void micropolisj.engine.Micropolis.setBudgetNumbers | ( | int | newTaxRate, |
double | roadPct, | ||
double | newRoadPct, | ||
double | newPolicePct, | ||
double | newFirePct, | ||
double | newResearchPct | ||
) |
Reimplemented in micropolisj.network.ClientMicropolis.
Definition at line 2666 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.cityTax, micropolisj.engine.PlayerInfo.firePercent, micropolisj.engine.Micropolis.getPlayerInfo(), micropolisj.engine.PlayerInfo.policePercent, micropolisj.engine.PlayerInfo.researchPercent, and micropolisj.engine.PlayerInfo.roadPercent.
Referenced by micropolisj.gui.BudgetDialog.applyChange().
void micropolisj.engine.Micropolis.setFunds | ( | int | totalFunds | ) |
Definition at line 2658 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.budget, micropolisj.engine.Micropolis.getPlayerInfo(), and micropolisj.engine.CityBudget.totalFunds.
Referenced by micropolisj.gui.NewCityDialog.onPlayClicked().
void micropolisj.engine.Micropolis.setGameLevel | ( | int | newLevel | ) |
Definition at line 2651 of file Micropolis.java.
References micropolisj.engine.Micropolis.gameLevel, and micropolisj.engine.GameLevel.isValid().
Referenced by micropolisj.gui.MainWindow.onDifficultyClicked(), and micropolisj.gui.NewCityDialog.onPlayClicked().
void micropolisj.engine.Micropolis.setSpeed | ( | Speed | newSpeed | ) |
Definition at line 2131 of file Micropolis.java.
References micropolisj.engine.Micropolis.simSpeed.
Referenced by micropolisj.gui.BudgetDialog.onContinueClicked(), and micropolisj.gui.MainWindow.onPriorityClicked().
void micropolisj.engine.Micropolis.setTile | ( | int | xpos, |
int | ypos, | ||
char | newTile | ||
) |
Definition at line 456 of file Micropolis.java.
References micropolisj.engine.Micropolis.fireTileChanged(), and micropolisj.engine.Micropolis.map.
Referenced by micropolisj.engine.Micropolis.animateTiles(), micropolisj.engine.Micropolis.makeEarthquake(), micropolisj.engine.Micropolis.makeFire(), micropolisj.engine.Micropolis.makeFlood(), and micropolisj.engine.Micropolis.setTile().
void micropolisj.engine.Micropolis.setTile | ( | int | xpos, |
int | ypos, | ||
char | newTile, | ||
int | playerID | ||
) |
Definition at line 466 of file Micropolis.java.
References micropolisj.util.Utilities.codePlayerID(), and micropolisj.engine.Micropolis.setTile().
|
private |
Definition at line 875 of file Micropolis.java.
void micropolisj.engine.Micropolis.spend | ( | int | amount, |
PlayerInfo | playerInfo | ||
) |
Definition at line 194 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.budget, micropolisj.engine.Micropolis.fireFundsChanged(), and micropolisj.engine.CityBudget.totalFunds.
Referenced by micropolisj.engine.Micropolis.spend().
void micropolisj.engine.Micropolis.spend | ( | int | amount | ) |
Definition at line 199 of file Micropolis.java.
References micropolisj.engine.Micropolis.playerInfo, and micropolisj.engine.Micropolis.spend().
|
protected |
Definition at line 1521 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.cashFlow, micropolisj.engine.PlayerInfo.churchCount, micropolisj.engine.Micropolis.cityTime, micropolisj.engine.PlayerInfo.comPop, micropolisj.engine.PlayerInfo.crimeAverage, micropolisj.engine.PlayerInfo.crimeRamp, micropolisj.engine.Micropolis.history, micropolisj.engine.PlayerInfo.hospitalCount, micropolisj.engine.PlayerInfo.indPop, micropolisj.engine.PlayerInfo.needChurch, micropolisj.engine.PlayerInfo.needHospital, micropolisj.engine.Micropolis.playerInfo, micropolisj.engine.PlayerInfo.polluteRamp, micropolisj.engine.PlayerInfo.pollutionAverage, and micropolisj.engine.PlayerInfo.resPop.
|
protected |
Definition at line 1596 of file Micropolis.java.
References micropolisj.engine.PlayerInfo.comPop, micropolisj.engine.Micropolis.history, micropolisj.engine.PlayerInfo.indPop, micropolisj.engine.Micropolis.playerInfo, and micropolisj.engine.PlayerInfo.resPop.
final boolean micropolisj.engine.Micropolis.testBounds | ( | int | xpos, |
int | ypos | ||
) |
Definition at line 470 of file Micropolis.java.
References micropolisj.engine.Micropolis.getHeight().
Referenced by micropolisj.engine.MapGenerator.doBRiv(), micropolisj.engine.MapGenerator.doSRiv(), micropolisj.engine.Sprite.getChar(), micropolisj.engine.Micropolis.getLandValue(), micropolisj.engine.Micropolis.getTrafficDensity(), micropolisj.engine.Micropolis.makeEarthquake(), micropolisj.engine.Micropolis.makeFlood(), micropolisj.engine.TornadoSprite.moveImpl(), micropolisj.engine.ShipSprite.moveImpl(), micropolisj.engine.MapGenerator.putOnMap(), micropolisj.engine.MapGenerator.smoothRiver(), micropolisj.engine.MapGenerator.smoothTrees(), and micropolisj.engine.MapGenerator.treeSplash().
|
private |
Definition at line 914 of file Micropolis.java.
References micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.movePowerLocation(), micropolisj.engine.CityLocation.x, and micropolisj.engine.CityLocation.y.
void micropolisj.engine.Micropolis.toggleAutoBudget | ( | ) |
Definition at line 2116 of file Micropolis.java.
References micropolisj.engine.Micropolis.autoBudget.
Referenced by micropolisj.gui.MainWindow.onAutoBudgetClicked(), and micropolisj.gui.BudgetDialog.onContinueClicked().
void micropolisj.engine.Micropolis.toggleAutoBulldoze | ( | ) |
Definition at line 2121 of file Micropolis.java.
References micropolisj.engine.Micropolis.autoBulldoze.
Referenced by micropolisj.gui.MainWindow.onAutoBulldozeClicked().
void micropolisj.engine.Micropolis.toggleDisasters | ( | ) |
Definition at line 2126 of file Micropolis.java.
References micropolisj.engine.Micropolis.noDisasters.
Referenced by micropolisj.gui.MainWindow.onDisastersClicked().
boolean micropolisj.engine.Micropolis.autoBudget = false |
Definition at line 166 of file Micropolis.java.
Referenced by micropolisj.gui.BudgetDialog.makeOptionsPane(), micropolisj.gui.BudgetDialog.onContinueClicked(), micropolisj.gui.MainWindow.startTimer(), and micropolisj.engine.Micropolis.toggleAutoBudget().
boolean micropolisj.engine.Micropolis.autoBulldoze = true |
Definition at line 165 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.toggleAutoBulldoze().
|
static |
Definition at line 191 of file Micropolis.java.
int micropolisj.engine.Micropolis.cityTime |
Definition at line 181 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.applyMapInfo(), micropolisj.network.ServerMicropolis.generateMapInfo(), micropolisj.engine.Micropolis.isBudgetTime(), micropolisj.engine.Micropolis.takeCensus(), and micropolisj.gui.MainWindow.updateDateLabel().
int [][] micropolisj.engine.Micropolis.crimeMem |
For each 2x2 section of the city, the crime level of the city (0-250). 0 is no crime; 250 is maximum crime. Updated each cycle by crimeScan(); affects land value.
Definition at line 103 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.drawCrimeMap(), micropolisj.engine.Micropolis.init(), and micropolisj.engine.Micropolis.queryZoneStatus().
ArrayList<FinancialHistory> micropolisj.engine.Micropolis.financialHistory = new ArrayList<FinancialHistory>() |
Definition at line 1693 of file Micropolis.java.
Referenced by micropolisj.gui.BudgetDialog.makeBalancePane().
int [][] micropolisj.engine.Micropolis.fireRate |
Definition at line 137 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.drawFireRadius(), micropolisj.engine.Micropolis.getFireStationCoverage(), and micropolisj.engine.Micropolis.init().
int micropolisj.engine.Micropolis.gameLevel |
Definition at line 170 of file Micropolis.java.
Referenced by micropolisj.network.ServerMicropolis.addNewPlayer(), micropolisj.engine.Micropolis.generateBudget(), micropolisj.gui.EvaluationPane.loadEvaluation(), micropolisj.gui.NewCityDialog.onPlayClicked(), and micropolisj.engine.Micropolis.setGameLevel().
History micropolisj.engine.Micropolis.history = new History() |
Definition at line 1196 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.load(), micropolisj.engine.Micropolis.save(), micropolisj.engine.Micropolis.takeCensus(), and micropolisj.engine.Micropolis.takeCensus2().
MainWindow micropolisj.engine.Micropolis.mainWindow |
Definition at line 186 of file Micropolis.java.
Referenced by micropolisj.gui.MainWindow.MainWindow(), and micropolisj.engine.SpaceshipSprite.SpaceshipSprite().
|
protected |
first 4 bits for playerID last 8 bits for tileValue
Definition at line 79 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.animateTiles(), micropolisj.network.ClientMicropolis.applyMapInfo(), micropolisj.network.ServerMicropolis.generateMapInfo(), micropolisj.engine.Micropolis.getHeight(), micropolisj.engine.Micropolis.getTile(), micropolisj.engine.Micropolis.getTileRaw(), micropolisj.engine.Micropolis.getWidth(), micropolisj.engine.Micropolis.init(), micropolisj.engine.Micropolis.makeFlood(), micropolisj.engine.Micropolis.makeMeltdown(), micropolisj.engine.MapGenerator.MapGenerator(), and micropolisj.engine.Micropolis.setTile().
boolean micropolisj.engine.Micropolis.noDisasters = true |
Definition at line 168 of file Micropolis.java.
Referenced by micropolisj.engine.AirplaneSprite.moveImpl(), and micropolisj.engine.Micropolis.toggleDisasters().
PlayerInfo micropolisj.engine.Micropolis.playerInfo |
Definition at line 160 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.animate(), micropolisj.network.ServerMicropolis.animate(), micropolisj.network.ClientMicropolis.applyPlayerInfo(), micropolisj.engine.Micropolis.generateBudget(), micropolisj.engine.Micropolis.getLocationOfMaxPollution(), micropolisj.network.ClientMicropolis.getPlayerInfo(), micropolisj.engine.Micropolis.getPlayerInfo(), micropolisj.engine.Micropolis.init(), micropolisj.gui.MainWindow.MainWindow(), micropolisj.engine.Micropolis.Micropolis(), micropolisj.engine.Micropolis.popDenScan(), micropolisj.engine.Micropolis.spend(), micropolisj.engine.Micropolis.takeCensus(), micropolisj.engine.Micropolis.takeCensus2(), and micropolisj.engine.TileSpec.usePollutionResearch().
int [][] micropolisj.engine.Micropolis.policeMapEffect |
Definition at line 139 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.drawPoliceRadius(), and micropolisj.engine.Micropolis.init().
int [][] micropolisj.engine.Micropolis.pollutionMem |
For each 2x2 section of the city, the pollution level of the city (0-255). 0 is no pollution; 255 is maximum pollution. Updated each cycle by ptlScan(); affects land value.
Definition at line 96 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.drawPollutionMap(), micropolisj.engine.Micropolis.init(), and micropolisj.engine.Micropolis.queryZoneStatus().
int [][] micropolisj.engine.Micropolis.popDensity |
For each 2x2 section of the city, the population density (0-?). Used for map overlays and as a factor for crime rates.
Definition at line 109 of file Micropolis.java.
Referenced by micropolisj.gui.OverlayMapView.drawPopDensity(), micropolisj.engine.Micropolis.init(), and micropolisj.engine.Micropolis.popDenScan().
Stack<CityLocation> micropolisj.engine.Micropolis.powerPlants = new Stack<CityLocation>() |
Definition at line 162 of file Micropolis.java.
|
private |
Definition at line 965 of file Micropolis.java.
int [][] micropolisj.engine.Micropolis.rateOGMem |
For each 8x8 section of the city, the rate of growth. Capped to a number between -200 and 200. Used for reporting purposes only; the number has no affect.
Definition at line 134 of file Micropolis.java.
Referenced by micropolisj.engine.Micropolis.decROGMem(), micropolisj.gui.OverlayMapView.drawRateOfGrowth(), micropolisj.engine.Micropolis.init(), and micropolisj.engine.Micropolis.queryZoneStatus().
int [][] micropolisj.engine.Micropolis.researchMapEffect |
Definition at line 142 of file Micropolis.java.
Speed micropolisj.engine.Micropolis.simSpeed = Speed.NORMAL |
Definition at line 188 of file Micropolis.java.
Referenced by micropolisj.network.ClientMicropolis.applyMapInfo(), micropolisj.network.ServerMicropolis.generateMapInfo(), micropolisj.engine.Micropolis.getSprites(), and micropolisj.engine.Sprite.remove().