Class HyperspaceAutomaton
java.lang.Object
com.fs.starfarer.api.impl.campaign.terrain.HyperspaceAutomaton
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[][]
protected int
protected boolean
protected int
protected IntervalUtil
protected int[][]
protected String
protected String
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionHyperspaceAutomaton
(int width, int height, float minInterval, float maxInterval) -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float days) static int[][]
decodeTiles
(String string, int w, int h) static String
encodeTiles
(int[][] tiles) int[][]
getCells()
protected int
getLiveCountAround
(int x, int y) static void
void
setLive
(float fraction) protected void
updateCells
(float days)
-
Field Details
-
cells
protected transient int[][] cells -
next
protected transient int[][] next -
savedCells
-
savedNext
-
interval
-
doneWithIteration
protected boolean doneWithIteration -
currentColumn
protected int currentColumn -
width
protected int width -
height
protected int height
-
-
Constructor Details
-
HyperspaceAutomaton
public HyperspaceAutomaton(int width, int height, float minInterval, float maxInterval)
-
-
Method Details
-
getInterval
-
advance
public void advance(float days) -
getCells
public int[][] getCells() -
updateCells
protected void updateCells(float days) -
setLive
public void setLive(float fraction) -
getLiveCountAround
protected int getLiveCountAround(int x, int y) -
encodeTiles
-
decodeTiles
- Throws:
DataFormatException
-
main
- Throws:
DataFormatException
-