public class SerializableImage
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
float |
gameScore |
int |
gameTick |
Types.WINNER |
gameWinner |
boolean |
isGameOver |
boolean |
isValidation |
| Constructor and Description |
|---|
SerializableImage(java.awt.image.BufferedImage image,
StateObservation s) |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
imageToByteArray(java.awt.image.BufferedImage image) |
java.lang.String |
serialize(java.lang.String filename)
This method serializes this class into a cohesive json object, using GSon,
and optionally saves the converted object to a given file.
|
public boolean isValidation
public float gameScore
public int gameTick
public Types.WINNER gameWinner
public boolean isGameOver
public SerializableImage(java.awt.image.BufferedImage image,
StateObservation s)
public static byte[] imageToByteArray(java.awt.image.BufferedImage image)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String serialize(java.lang.String filename)
filename - Name of the file to save the serialization to (optional)