Package net.royalur.lut
Class Lut
java.lang.Object
net.royalur.lut.Lut
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final bytestatic final byte[]static final byte
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
MAGICpublic static final byte[] MAGIC
- 
VERSION_0public static final byte VERSION_0- See Also:
 
- 
LATEST_VERSIONpublic static final byte LATEST_VERSION- See Also:
 
 
- 
- 
Constructor Details- 
Lut
 
- 
- 
Method Details- 
shallowCopyA different instance of Lut must be used on each thread.
- 
getEntryCountpublic int getEntryCount()
- 
getGameStateEncoding
- 
getMetadata
- 
getGameSettings
- 
getMap
- 
getMaps
- 
getLightWinPercentAssumes that the game is using symmetrical paths. NOT thread-safe.
- 
getLightWinPercentAssumes that the game is using symmetrical paths. NOT thread-safe.
- 
getLightWinPercentAssumes that the game is using symmetrical paths. This is thread-safe.
- 
updateLightWinPercent
- 
convertValueTypes
- 
write- Throws:
- IOException
 
- 
writepublic void write(ValueType outputValueType, JsonNotation notation, FileChannel channel) throws IOException - Throws:
- IOException
 
- 
writepublic void write(ValueType outputValueType, JsonNotation notation, DataSink output) throws IOException - Throws:
- IOException
 
- 
read- Throws:
- IOException
 
- 
readpublic static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, File file) throws IOException- Throws:
- IOException
 
- 
readpublic static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, FileChannel channel) throws IOException- Throws:
- IOException
 
- 
readpublic static Lut read(JsonNotation jsonNotation, Function<GameSettings, GameStateEncoding> encodingGenerator, DataSource source) throws IOException- Throws:
- IOException
 
 
-