progress moving away from 'squares' field to layer tree
This commit is contained in:
@@ -2,7 +2,10 @@ structure LayerTree =
|
||||
struct
|
||||
datatype t = NODE of {key: int, value: Grid.t, left: t, right: t} | LEAF
|
||||
|
||||
val empty = LEAF
|
||||
fun init maxSide =
|
||||
let val grid = Grid.makeEmpty maxSide
|
||||
in NODE {key = 0, value = grid, left = LEAF, right = LEAF}
|
||||
end
|
||||
|
||||
fun insert (newKey, newValue, tree) =
|
||||
case tree of
|
||||
@@ -82,7 +85,4 @@ struct
|
||||
in
|
||||
insert (key, grid, tree)
|
||||
end
|
||||
|
||||
fun removePixel (key, newX, newY, maxSide, tree) =
|
||||
addPixel (key, newX, newY, maxSide, Grid.emptyPixel, tree)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user