prepare for hexagon display & other models
- display cell as hexagon is Display.mHexagon if set ( not default ) will need a checkbox to set this - various new models preparation...
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package org.artisanlogiciel.games.maze;
|
||||
|
||||
import org.artisanlogiciel.games.maze.model.HalfSquareModelCreator;
|
||||
import org.artisanlogiciel.games.maze.model.HalfSquareRasterModel;
|
||||
import org.artisanlogiciel.games.maze.persist.HalfSquareRasterModelPersistRaw;
|
||||
import org.artisanlogiciel.games.maze.persist.MazePersistRaw;
|
||||
import org.artisanlogiciel.games.maze.persist.MazePersistWorldEdit;
|
||||
import org.artisanlogiciel.games.stl.Maze3dParams;
|
||||
@@ -176,7 +179,6 @@ public class Maze {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void saveText() {
|
||||
File outfile = getFileForExtension("txt");
|
||||
writeSentence("Saving to " + outfile + " ...");
|
||||
@@ -191,6 +193,24 @@ public class Maze {
|
||||
}
|
||||
}
|
||||
|
||||
public void saveHalfSquerRaw() {
|
||||
String extension = "sraw";
|
||||
File outfile = getFileForExtension(extension);
|
||||
writeSentence("Saving to " + outfile + " ...");
|
||||
try {
|
||||
// TODO
|
||||
HalfSquareRasterModelPersistRaw persistRaw = new HalfSquareRasterModelPersistRaw(new HalfSquareModelCreator().createFromMovesProvider(model));
|
||||
DataOutputStream out = new DataOutputStream(new FileOutputStream(outfile));
|
||||
persistRaw.streamOut(extension,out);
|
||||
out.write(model.toLabyMap().toString().getBytes());
|
||||
out.flush();
|
||||
out.close();
|
||||
writeSentence("... Done.");
|
||||
} catch (IOException io) {
|
||||
io.printStackTrace(System.err);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setModel( LabyModel model)
|
||||
{
|
||||
this.model = model;
|
||||
|
||||
Reference in New Issue
Block a user