9
This commit is contained in:
parent
523d951a67
commit
3cd62194b9
94
app/Main.hs
94
app/Main.hs
|
@ -17,26 +17,30 @@ world0 = World {
|
|||
boxColor = withForeColor defAttr green,
|
||||
boxLocation = Location '1' (-1) 0,
|
||||
boxType = Original $ makeWalls [
|
||||
"▓▓ ▓▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓▓▓ ▓"
|
||||
"▓▓ ▓▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
" ▓",
|
||||
"▓ ▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓▓▓▓▓ ▓"
|
||||
]
|
||||
}),
|
||||
('2', Box {
|
||||
boxColor = withForeColor defAttr cyan,
|
||||
boxLocation = Location '1' 1 1,
|
||||
boxType = Original $ makeWalls [
|
||||
"▓ ▓ ▓ ▓",
|
||||
" ",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓ ▓ ▓"
|
||||
"▓ ▓▓ ▓▓ ▓",
|
||||
" ",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓▓ ▓▓ ▓"
|
||||
]
|
||||
}),
|
||||
('₂', Box {
|
||||
|
@ -48,70 +52,76 @@ world0 = World {
|
|||
boxColor = withForeColor defAttr blue,
|
||||
boxLocation = Location '2' 1 1,
|
||||
boxType = Original $ makeWalls [
|
||||
"▓▓▓▓▓▓▓",
|
||||
"▓ ▓▓▓",
|
||||
"▓ ▓▓▓",
|
||||
"▓▓▓ ▓▓▓",
|
||||
"▓ ▓▓▓",
|
||||
"▓ ▓▓▓",
|
||||
"▓▓▓ ▓▓▓"
|
||||
"▓▓▓▓▓▓▓▓▓",
|
||||
"▓▓▓▓▓▓▓▓▓",
|
||||
"▓▓▓▓▓▓▓▓▓",
|
||||
"▓▓ ▓▓▓▓",
|
||||
"▓▓ ▓▓▓▓",
|
||||
"▓▓▓▓ ▓▓▓▓",
|
||||
"▓▓ ▓▓▓▓",
|
||||
"▓▓ ▓▓▓▓",
|
||||
"▓▓▓▓ ▓▓▓▓"
|
||||
]
|
||||
}),
|
||||
('4', Box {
|
||||
boxColor = withForeColor defAttr black,
|
||||
boxLocation = Location '3' (-3) 0,
|
||||
boxLocation = Location 'b' (-3) 0,
|
||||
boxType = Original $ makeWalls [
|
||||
"▓▓ ▓▓",
|
||||
"▓ ▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓▓▓ ▓▓▓"
|
||||
"▓▓▓ ▓▓▓",
|
||||
"▓ ▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓▓▓▓ ▓▓▓▓"
|
||||
]
|
||||
}),
|
||||
('b', Box {
|
||||
boxColor = withForeColor defAttr red,
|
||||
boxLocation = Location '1' 0 1,
|
||||
boxType = Original $ makeWalls [
|
||||
"▓▓▓▓▓▓▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓▓",
|
||||
"▓ ▓",
|
||||
"▓▓▓▓▓▓▓"
|
||||
"▓▓▓▓▓▓▓▓▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
" ",
|
||||
"▓ ▓▓",
|
||||
"▓ ▓",
|
||||
"▓ ▓",
|
||||
"▓▓▓▓▓▓▓▓▓"
|
||||
]
|
||||
}),
|
||||
('x', Box {
|
||||
boxColor = withForeColor defAttr yellow,
|
||||
boxLocation = Location '1' 0 (-1),
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('y', Box {
|
||||
boxColor = withForeColor defAttr magenta,
|
||||
boxLocation = Location '1' 0 (-2),
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('i', Box {
|
||||
boxColor = withForeColor defAttr black,
|
||||
boxLocation = Location 'b' 0 (-2),
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('j', Box {
|
||||
boxColor = withForeColor defAttr black,
|
||||
boxLocation = Location 'b' 0 (-1),
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('k', Box {
|
||||
boxColor = withForeColor defAttr black,
|
||||
boxLocation = Location 'b' 0 0,
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('l', Box {
|
||||
boxColor = withForeColor defAttr black,
|
||||
boxLocation = Location 'b' 0 1,
|
||||
boxType = Original $ solid 7
|
||||
boxType = Original $ solid 9
|
||||
}),
|
||||
('₁', Box {
|
||||
boxColor = withForeColor defAttr green,
|
||||
|
|
|
@ -48,18 +48,18 @@ renderBox world locMap box name scale =
|
|||
|
||||
drawNestedWorld :: World -> Image
|
||||
drawNestedWorld world =
|
||||
-- (3*49) + 49 + (3*49)
|
||||
cropTop (49 + 2*border) $
|
||||
cropLeft (2*(49 + 2*border)) $
|
||||
cropBottom (2*49 + border) $
|
||||
cropRight (2*(2*49 + border)) $
|
||||
-- (3*81) + 81 + (3*81)
|
||||
cropTop (81 + 2*border) $
|
||||
cropLeft (2*(81 + 2*border)) $
|
||||
cropBottom (2*81 + border) $
|
||||
cropRight (2*(2*81 + border)) $
|
||||
vertCat [
|
||||
horizCat [
|
||||
case stackedLoc world (Location name1 y_ x_) of
|
||||
Nothing -> unit (withForeColor defAttr black) 49 '?'
|
||||
Nothing -> unit (withForeColor defAttr black) 81 '?'
|
||||
Just (Location n y x) ->
|
||||
let box = worldBoxes world Map.! n in
|
||||
renderCell world locMap n box y x 49
|
||||
renderCell world locMap n box y x 81
|
||||
| x_ <- [x1-1 .. x1+1]
|
||||
]
|
||||
| y_ <- [y1-1 .. y1+1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user