Package net.royalur.lut
Class Lut
java.lang.Object
net.royalur.lut.Lut
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
static final byte[]
static final byte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
double
Assumes that the game is using symmetrical paths.double
getLightWinPercent
(FastSimpleGame game, FastSimpleGame tempGame) Assumes that the game is using symmetrical paths.double
getLightWinPercent
(GameState state) Assumes that the game is using symmetrical paths.getMap
(int upperKey) LutMap[]
getMaps()
static Lut
static Lut
read
(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, File file) static Lut
read
(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, FileChannel channel) static Lut
read
(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, DataSource source) A different instance of Lut must be used on each thread.double
updateLightWinPercent
(FastSimpleGame game, double winPercent) void
write
(JsonNotation notation, File file) void
write
(JsonNotation notation, FileChannel channel) void
write
(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
-
copyValuesToFloat32
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- 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
-