Commit 9ec9f897 authored by Job Cuppen's avatar Job Cuppen

reset switches to blocked when tile is removed

parent b990b14d
......@@ -61,12 +61,12 @@ addDesignTileAttributes tile i dirString img = img
<@< { strokewidth = (px (strw))}
updateTileAt :: Tile Int Direction [Tile] -> [Tile]
updateTileAt tile i NE tiles = updateAt i {tile & ne = not tile.ne} tiles
updateTileAt tile i NW tiles = updateAt i {tile & nw = not tile.nw} tiles
updateTileAt tile i SW tiles = updateAt i {tile & sw = not tile.sw} tiles
updateTileAt tile i SE tiles = updateAt i {tile & se = not tile.se} tiles
updateTileAt tile i NS tiles = updateAt i {tile & ns = not tile.ns} tiles
updateTileAt tile i EW tiles = updateAt i {tile & ew = not tile.ew} tiles
updateTileAt tile i NE tiles = updateAt i {tile & ne = not tile.ne, north = Blocked, east = Blocked} tiles
updateTileAt tile i NW tiles = updateAt i {tile & nw = not tile.nw, north = Blocked, west = Blocked} tiles
updateTileAt tile i SW tiles = updateAt i {tile & sw = not tile.sw, south = Blocked, west = Blocked} tiles
updateTileAt tile i SE tiles = updateAt i {tile & se = not tile.se, south = Blocked, east = Blocked} tiles
updateTileAt tile i NS tiles = updateAt i {tile & ns = not tile.ns, north = Blocked, south = Blocked} tiles
updateTileAt tile i EW tiles = updateAt i {tile & ew = not tile.ew, east = Blocked, west = Blocked} tiles
directionFor :: Direction Tile -> Bool
directionFor NE tile = tile.ne
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment