Reify block drawing
This commit is contained in:
@@ -14,7 +14,6 @@ import Dodge.Base.CardinalPoint
|
||||
--import Padding
|
||||
import Color
|
||||
import Shape
|
||||
import ShapePicture
|
||||
import LensHelp
|
||||
import Geometry
|
||||
|
||||
@@ -32,14 +31,17 @@ randomTank = takeOne $ map (\f -> f (dim orange) orange)
|
||||
, tankSquareDec plusDecoration
|
||||
]
|
||||
|
||||
-- dup with randEdgeTanks?
|
||||
randEdgeTank :: RandomGen g => State g Placement
|
||||
randEdgeTank = do
|
||||
edge <- takeOne cardList
|
||||
basetank <- randomTank
|
||||
return $ basetank
|
||||
& plType . putBlock . blDraw
|
||||
%~ fmap (<> noPic ( colorSH orange (verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge))))
|
||||
%~ ( \bd -> BlockDraws [bd, BlockDrawBlSh (BlShConst $ colorSH orange (verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge)))] )
|
||||
-- %~ fmap (<> noPic ( colorSH orange (verticalPipe 80
|
||||
-- <> horPipe 80 0 (70 *.* cardVec edge))))
|
||||
-- 70 is a guess, the true value depends on the distance to the wall
|
||||
& plSpot .~ rprBool (\rp _ -> _rpPlacementUse rp == 0
|
||||
&& rpOffPathFromEdge (PathFromEdge edge 0) rp)
|
||||
@@ -50,8 +52,8 @@ randEdgeTanks i = do
|
||||
basetank <- randomTank
|
||||
return $ replicate i $ basetank
|
||||
& plType . putBlock . blDraw
|
||||
%~ fmap (<> noPic ( colorSH orange (verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge))))
|
||||
%~ ( \bd -> BlockDraws [bd, BlockDrawBlSh (BlShConst $ colorSH orange (verticalPipe 80
|
||||
<> horPipe 80 0 (70 *.* cardVec edge)))] )
|
||||
-- 70 is a guess, the true value depends on the distance to the wall
|
||||
& plSpot .~ rprBool (\rp _ -> _rpPlacementUse rp == 0
|
||||
&& rpOffPathFromEdge (PathFromEdge edge 0) rp)
|
||||
|
||||
Reference in New Issue
Block a user