*/
public static void main(String[] args) {
// The Game containing the Board.
IGame game = new Game();
IBoard board = game.getBoard();
Coords coords = null;
boolean success = true;
// Try to conduct the test.
try {
// The serialized board *before* it is encoded.
ByteArrayOutputStream before = new ByteArrayOutputStream();
GZIPOutputStream bzos = new GZIPOutputStream(before);
ObjectOutputStream boos = new ObjectOutputStream(bzos);
// The serialized board *after* it is encoded
ByteArrayOutputStream after = new ByteArrayOutputStream();
GZIPOutputStream azos = new GZIPOutputStream(after);
ObjectOutputStream aoos = new ObjectOutputStream(azos);
// The character writer for encoding.
CharArrayWriter to = new CharArrayWriter();
// Load the test board.
board.load(TestBoardEncoder.getTestInputStream());
// Add some infernos and fires.
ITerrainFactory f = Terrains.getTerrainFactory();
coords = new Coords(5, 3);
board.addInfernoTo(coords, InfernoTracker.STANDARD_ROUND, 1);
board.getHex(coords).addTerrain(f.createTerrain(Terrains.FIRE, 1));
coords = new Coords(8, 6);
board.addInfernoTo(coords, InfernoTracker.STANDARD_ROUND, 1);
board.getHex(coords).addTerrain(f.createTerrain(Terrains.FIRE, 2));
coords = new Coords(4, 10);
board.getHex(coords).addTerrain(f.createTerrain(Terrains.FIRE, 2));
coords = new Coords(7, 13);
board.addInfernoTo(coords, InfernoTracker.STANDARD_ROUND, 2);
board.getHex(coords).addTerrain(f.createTerrain(Terrains.FIRE, 2));
coords = new Coords(11, 14);
board.getHex(coords).addTerrain(f.createTerrain(Terrains.FIRE, 2));
// Save a copy of the board before XML encoding.
boos.writeObject(board);
boos.close();