Package net.royalur.lut
Class Lut
java.lang.Object
net.royalur.lut.Lut
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final byte[]static final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertValueTypes(ValueType newValueType) intdoubleAssumes that the game is using symmetrical paths.doublegetLightWinPercent(FastSimpleGame game, FastSimpleGame tempGame) Assumes that the game is using symmetrical paths.doublegetLightWinPercent(GameState state) Assumes that the game is using symmetrical paths.getMap(int upperKey) LutMap[]getMaps()static Lutstatic Lutread(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, File file) static Lutread(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, FileChannel channel) static Lutread(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, DataSource source) A different instance of Lut must be used on each thread.doubleupdateLightWinPercent(FastSimpleGame game, double winPercent) voidwrite(ValueType outputValueType, JsonNotation notation, File file) voidwrite(ValueType outputValueType, JsonNotation notation, FileChannel channel) voidwrite(ValueType outputValueType, JsonNotation notation, DataSink output)
-
Field Details
-
MAGIC
public static final byte[] MAGIC -
VERSION_0
public static final byte VERSION_0- See Also:
-
LATEST_VERSION
public static final byte LATEST_VERSION- See Also:
-
-
Constructor Details
-
Lut
-
-
Method Details
-
shallowCopy
A different instance of Lut must be used on each thread. -
getEntryCount
public int getEntryCount() -
getGameStateEncoding
-
getMetadata
-
getGameSettings
-
getMap
-
getMaps
-
getLightWinPercent
Assumes that the game is using symmetrical paths. NOT thread-safe. -
getLightWinPercent
Assumes that the game is using symmetrical paths. NOT thread-safe. -
getLightWinPercent
Assumes that the game is using symmetrical paths. This is thread-safe. -
updateLightWinPercent
-
convertValueTypes
-
write
- Throws:
IOException
-
write
public void write(ValueType outputValueType, JsonNotation notation, FileChannel channel) throws IOException - Throws:
IOException
-
write
public void write(ValueType outputValueType, JsonNotation notation, DataSink output) throws IOException - Throws:
IOException
-
read
- Throws:
IOException
-
read
public static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, File file) throws IOException- Throws:
IOException
-
read
public static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, FileChannel channel) throws IOException- Throws:
IOException
-
read
public static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, DataSource source) throws IOException- Throws:
IOException
-