100NvimTree_1 done with functionality to export collisions
This commit is contained in:
@@ -11,6 +11,7 @@ struct
|
||||
val structureName = "Green"
|
||||
val filename = "green.dsc"
|
||||
val exportFilename = "green.sml"
|
||||
val collisionFilename = "green-collisions.sml"
|
||||
|
||||
fun loadIO (io, str) =
|
||||
case TextIO.inputLine io of
|
||||
@@ -33,18 +34,10 @@ struct
|
||||
| NONE => ()
|
||||
end
|
||||
|
||||
fun saveSquares squaresString =
|
||||
fun saveString (filename, toSaveString) =
|
||||
let
|
||||
val io = TextIO.openOut filename
|
||||
val () = TextIO.output (io, squaresString)
|
||||
in
|
||||
TextIO.closeOut io
|
||||
end
|
||||
|
||||
fun exportSquares squaresString =
|
||||
let
|
||||
val io = TextIO.openOut exportFilename
|
||||
val () = TextIO.output (io, squaresString)
|
||||
val () = TextIO.output (io, toSaveString)
|
||||
in
|
||||
TextIO.closeOut io
|
||||
end
|
||||
@@ -83,9 +76,10 @@ struct
|
||||
let
|
||||
val _ =
|
||||
case Mailbox.recv fileMailbox of
|
||||
SAVE_SQUARES str => saveSquares str
|
||||
SAVE_SQUARES str => saveString (filename, str)
|
||||
| EXPORT_SQUARES str => saveString (exportFilename, str)
|
||||
| EXPORT_COLLISIONS str => saveString (collisionFilename, str)
|
||||
| LOAD_SQUARES => loadSquares (filename, inputMailbox)
|
||||
| EXPORT_SQUARES str => exportSquares str
|
||||
| LOAD_FILES path => loadFiles (path, inputMailbox)
|
||||
| SELECT_PATH path => selectPath (path, inputMailbox)
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user