Methapolis
0.27
|
Public Member Functions | |
ServerMicropolis () | |
ServerMicropolis (RemoteDistributor server, Map< Integer, PlayerInfo > playerInfos) | |
void | animate () |
int | getNumberOfPlayers () |
PlayerInfo | getPlayerInfo () |
PlayerInfo | getPlayerInfo (int playerID) |
void | addNewPlayer (int playerID) |
RemoteDistributor | getServer () |
void | setServer (RemoteDistributor server) |
NetworkServer | getSocketBuilder () |
void | setSocketBuilder (NetworkServer socketBuilder) |
Map< Integer, PlayerInfo > | getPlayerInfos () |
void | setPlayerInfos (Map< Integer, PlayerInfo > playerInfos) |
Public Member Functions inherited from micropolisj.engine.Micropolis | |
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) |
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) |
Private Member Functions | |
void | doBudgetInput (BudgetInput bud, PlayerInfo pI) |
MapInfo | generateMapInfo () |
Private Attributes | |
RemoteDistributor | server |
NetworkServer | socketBuilder |
Map< Integer, PlayerInfo > | playerInfos |
Additional Inherited Members | |
Public Attributes inherited from micropolisj.engine.Micropolis | |
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 inherited from micropolisj.engine.Micropolis | |
static final int | CENSUSRATE = 4 |
Protected Member Functions inherited from micropolisj.engine.Micropolis | |
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 inherited from micropolisj.engine.Micropolis | |
char[][] | map |
List< Sprite > | sprites = new ArrayList<Sprite>() |
Definition at line 14 of file ServerMicropolis.java.
micropolisj.network.ServerMicropolis.ServerMicropolis | ( | ) |
Definition at line 22 of file ServerMicropolis.java.
micropolisj.network.ServerMicropolis.ServerMicropolis | ( | RemoteDistributor | server, |
Map< Integer, PlayerInfo > | playerInfos | ||
) |
Definition at line 27 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.playerInfos, micropolisj.network.ServerMicropolis.server, and micropolisj.network.ServerMicropolis.socketBuilder.
void micropolisj.network.ServerMicropolis.addNewPlayer | ( | int | playerID | ) |
Definition at line 105 of file ServerMicropolis.java.
References micropolisj.engine.PlayerInfo.budget, micropolisj.engine.Micropolis.gameLevel, micropolisj.engine.GameLevel.getStartingFunds(), micropolisj.network.ServerMicropolis.playerInfos, and micropolisj.engine.CityBudget.totalFunds.
Referenced by micropolisj.network.RemoteDistributor.getNewID().
void micropolisj.network.ServerMicropolis.animate | ( | ) |
Reimplemented from micropolisj.engine.Micropolis.
Definition at line 52 of file ServerMicropolis.java.
References micropolisj.engine.ToolStroke.apply(), micropolisj.network.RemoteDistributor.clearInput(), micropolisj.network.ServerMicropolis.doBudgetInput(), micropolisj.network.ServerMicropolis.generateMapInfo(), micropolisj.network.RemoteDistributor.getInput(), micropolisj.network.ServerMicropolis.getPlayerInfo(), micropolisj.engine.Micropolis.playerInfo, micropolisj.network.ServerMicropolis.playerInfos, micropolisj.network.ServerMicropolis.server, micropolisj.engine.ToolStroke.setCity(), and micropolisj.network.RemoteDistributor.setMapInfo().
|
private |
Definition at line 74 of file ServerMicropolis.java.
References micropolisj.network.PlayerInput.BudgetInput.cityTax, micropolisj.engine.PlayerInfo.cityTax, micropolisj.engine.PlayerInfo.firePercent, micropolisj.network.PlayerInput.BudgetInput.policePercent, micropolisj.engine.PlayerInfo.policePercent, micropolisj.network.PlayerInput.BudgetInput.researchPercent, micropolisj.engine.PlayerInfo.researchPercent, micropolisj.network.PlayerInput.BudgetInput.roadPercent, and micropolisj.engine.PlayerInfo.roadPercent.
Referenced by micropolisj.network.ServerMicropolis.animate().
|
private |
Definition at line 99 of file ServerMicropolis.java.
References micropolisj.engine.Micropolis.cityTime, micropolisj.engine.Micropolis.map, and micropolisj.engine.Micropolis.sprites.
Referenced by micropolisj.network.ServerMicropolis.animate().
int micropolisj.network.ServerMicropolis.getNumberOfPlayers | ( | ) |
Reimplemented from micropolisj.engine.Micropolis.
Definition at line 85 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.playerInfos.
PlayerInfo micropolisj.network.ServerMicropolis.getPlayerInfo | ( | ) |
Reimplemented from micropolisj.engine.Micropolis.
Definition at line 90 of file ServerMicropolis.java.
Referenced by micropolisj.network.ServerMicropolis.animate(), and micropolisj.network.RemoteDistributor.getPlayerInfo().
PlayerInfo micropolisj.network.ServerMicropolis.getPlayerInfo | ( | int | playerID | ) |
Reimplemented from micropolisj.engine.Micropolis.
Definition at line 95 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.playerInfos.
Map<Integer, PlayerInfo> micropolisj.network.ServerMicropolis.getPlayerInfos | ( | ) |
Definition at line 127 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.playerInfos.
Referenced by micropolisj.gui.MainWindow.onLoadGameClicked().
RemoteDistributor micropolisj.network.ServerMicropolis.getServer | ( | ) |
Definition at line 111 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.server.
Referenced by micropolisj.gui.MainWindow.onLoadGameClicked().
NetworkServer micropolisj.network.ServerMicropolis.getSocketBuilder | ( | ) |
Definition at line 119 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.socketBuilder.
void micropolisj.network.ServerMicropolis.setPlayerInfos | ( | Map< Integer, PlayerInfo > | playerInfos | ) |
Definition at line 131 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.playerInfos.
void micropolisj.network.ServerMicropolis.setServer | ( | RemoteDistributor | server | ) |
Definition at line 115 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.server.
void micropolisj.network.ServerMicropolis.setSocketBuilder | ( | NetworkServer | socketBuilder | ) |
Definition at line 123 of file ServerMicropolis.java.
References micropolisj.network.ServerMicropolis.socketBuilder.
|
private |
Definition at line 18 of file ServerMicropolis.java.
Referenced by micropolisj.network.ServerMicropolis.addNewPlayer(), micropolisj.network.ServerMicropolis.animate(), micropolisj.network.ServerMicropolis.getNumberOfPlayers(), micropolisj.network.ServerMicropolis.getPlayerInfo(), micropolisj.network.ServerMicropolis.getPlayerInfos(), micropolisj.network.ServerMicropolis.ServerMicropolis(), and micropolisj.network.ServerMicropolis.setPlayerInfos().
|
private |
Definition at line 16 of file ServerMicropolis.java.
Referenced by micropolisj.network.ServerMicropolis.animate(), micropolisj.network.ServerMicropolis.getServer(), micropolisj.network.ServerMicropolis.ServerMicropolis(), and micropolisj.network.ServerMicropolis.setServer().
|
private |
Definition at line 17 of file ServerMicropolis.java.
Referenced by micropolisj.network.ServerMicropolis.getSocketBuilder(), micropolisj.network.ServerMicropolis.ServerMicropolis(), and micropolisj.network.ServerMicropolis.setSocketBuilder().