diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/graphics/beard.bmp b/graphics/beard.bmp
new file mode 100644
Binary files /dev/null and b/graphics/beard.bmp differ
diff --git a/graphics/bricks.bmp b/graphics/bricks.bmp
new file mode 100644
Binary files /dev/null and b/graphics/bricks.bmp differ
diff --git a/graphics/bug.bmp b/graphics/bug.bmp
new file mode 100644
Binary files /dev/null and b/graphics/bug.bmp differ
diff --git a/graphics/ghost.bmp b/graphics/ghost.bmp
new file mode 100644
Binary files /dev/null and b/graphics/ghost.bmp differ
diff --git a/graphics/goto.bmp b/graphics/goto.bmp
new file mode 100644
Binary files /dev/null and b/graphics/goto.bmp differ
diff --git a/graphics/lambda.bmp b/graphics/lambda.bmp
new file mode 100644
Binary files /dev/null and b/graphics/lambda.bmp differ
diff --git a/graphics/lamrock.bmp b/graphics/lamrock.bmp
new file mode 100644
Binary files /dev/null and b/graphics/lamrock.bmp differ
diff --git a/graphics/lift.bmp b/graphics/lift.bmp
new file mode 100644
Binary files /dev/null and b/graphics/lift.bmp differ
diff --git a/graphics/miner.bmp b/graphics/miner.bmp
new file mode 100644
Binary files /dev/null and b/graphics/miner.bmp differ
diff --git a/graphics/openlift.bmp b/graphics/openlift.bmp
new file mode 100644
Binary files /dev/null and b/graphics/openlift.bmp differ
diff --git a/graphics/razor.bmp b/graphics/razor.bmp
new file mode 100644
Binary files /dev/null and b/graphics/razor.bmp differ
diff --git a/graphics/rock.bmp b/graphics/rock.bmp
new file mode 100644
Binary files /dev/null and b/graphics/rock.bmp differ
diff --git a/graphics/target.bmp b/graphics/target.bmp
new file mode 100644
Binary files /dev/null and b/graphics/target.bmp differ
diff --git a/lifter.cabal b/lifter.cabal
new file mode 100644
--- /dev/null
+++ b/lifter.cabal
@@ -0,0 +1,27 @@
+Name:           lifter
+Version:        0.1
+License:        BSD3
+Author:         ICFP Contest 2012 Organisers 
+Maintainer:     Edwin Brady <eb@cs.st-andrews.ac.uk>
+Homepage:       http://icfpcontest2012.wordpress.com/
+
+Stability:      Beta
+Category:       Games 
+Synopsis:       A boulderdash-like game and solution validator
+Description:    ICFP Contest 2012 task
+
+Cabal-Version:  >= 1.6
+Build-type:     Simple
+
+Data-files:     graphics/*.bmp maps/*.map maps/full/*.map maps/lightning/*.map
+
+Executable     lifter
+               Main-is: Main.hs
+               hs-source-dirs: src
+               Other-modules: Map, Rules
+                              Paths_lifter
+
+               Build-depends:   base>=4 && <5, mtl, gloss>=1.7.4.1, 
+                                bytestring, stb-image, bitmap,
+                                array, directory, filepath
+                                
diff --git a/maps/beard.map b/maps/beard.map
new file mode 100644
--- /dev/null
+++ b/maps/beard.map
@@ -0,0 +1,22 @@
+   ###########L#######   
+  #.....*......*..... #  
+ #.... .*.....*......  # 
+ #..*. .*.....*......  # 
+#. ..*.....*..*...*... .#
+#. ..*.....*..*...*... .#
+#...#################...#
+#...#\\\\\\\\\\\\\\\#...#
+ #. .#************\#...# 
+ #...#\\\\\\\\\\\\\#. .# 
+ #....#####\#######.. .# 
+  #...*. ..*... ......#  
+  #...*. ..*... .*....#  
+  #.. .. ..*.... .*...#  
+  #.. .. ..*.... .*...#  
+   #....*... .. .. ..#   
+   #....*... .. .. ..#   
+    #......*.*... ..#    
+    #... ..*.*... ..#    
+     ##... .......##     
+       ####..R.###       
+           ####          
diff --git a/maps/beard1.map b/maps/beard1.map
new file mode 100644
--- /dev/null
+++ b/maps/beard1.map
@@ -0,0 +1,13 @@
+##########
+#**  \\\\#
+#.R..    #
+# \  ..*\#
+#!   ..*!#
+####   # #
+#\\... # L
+#\\.W... #
+#\\.     #
+##########
+
+Growth 15
+Razors 0
diff --git a/maps/beard2.map b/maps/beard2.map
new file mode 100644
--- /dev/null
+++ b/maps/beard2.map
@@ -0,0 +1,19 @@
+##############################
+#R...........................#
+#.........................W..#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#............................#
+#..*****.*\...*...*...*****..#
+#..*\....*\....*\*..*.\\*\\..#
+#..*\....****..!*!......*....#
+#..*\....*\....*\*..*...*....#
+#..*\....*\...*...*.....*....#
+#............................#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#................ ..... .....#
+#................      W....L#
+##############################
+
+Growth 25
+Razors 10
+Flooding 20
diff --git a/maps/beard3.map b/maps/beard3.map
new file mode 100644
--- /dev/null
+++ b/maps/beard3.map
@@ -0,0 +1,16 @@
+        ################
+        #*****#!!  1   #
+        #..\..#        #
+#########\\\\ # .\\\.  #
+#.............# *      #
+#.. .\\\#..!..#\**     #
+#.. LW\\#W  ..##### ####
+#..R\\\\#.. ..*\*\*W...#
+#.......A.. ...\.\...\\#
+#..........     **     #
+############....\.######
+           #.....!#
+           ########
+
+Growth 10
+Trampoline A targets 1
diff --git a/maps/beard4.map b/maps/beard4.map
new file mode 100644
--- /dev/null
+++ b/maps/beard4.map
@@ -0,0 +1,16 @@
+####################
+#W\\!#\\\**.\#W\\\W#
+##*######..###..\\\#
+#.......\.R ###...\#
+#####.###.#.......##
+#.......#.#\####.###
+#\\##\###\#\\#...#.L
+#\##\.###.####.#.#.#
+#\W#####.....###.W.#
+####\\...\\\...#.#.#
+#W*######.######.#.#
+#\\\\\\\\\.........#
+############\###\###
+#\\.. *..........\\#
+#W... #.........##W#
+####################
diff --git a/maps/beard5.map b/maps/beard5.map
new file mode 100644
--- /dev/null
+++ b/maps/beard5.map
@@ -0,0 +1,50 @@
+<<<<<<< HEAD
+             ##########
+          ####..******####
+        ###..  3ABCDEF...##
+        ##                 ## 
+       ###                  ##
+       ##.....\\\...\\\.....###
+      #..     \\\ * \\\      ##
+       #          *          #
+        ##       ***        #
+         #*****************#
+          ##..............#
+            ##...........#
+              ###WR..W###
+                 #L###
+                 .....
+              #####  #####
+             #1 ! G##2 ! H#
+              #####  #####
+=======
+           ##########
+        ####..******####
+      ###..  3ABCDEF...##
+      ##                 ## 
+     ###                  ##
+    ###.....\\\...\\\.....###
+    #..     \\\ * \\\      ##
+    ##          *          ##
+     ###       ***        ##
+       #*****************##
+       ###..............##
+         ###...........##
+           ####WR..W####
+              ##L####
+               .....
+           ######  ######
+          ##1\! G##2 !\H##
+           ######  ######
+>>>>>>> e32e9bd8526c252a8bf9d027dfc59652da6148c3
+
+Trampoline A targets 1
+Trampoline B targets 1
+Trampoline C targets 1
+Trampoline D targets 1
+Trampoline E targets 1
+Trampoline F targets 1
+Trampoline G targets 2
+Trampoline H targets 3
+Growth 5
+Razors 0
diff --git a/maps/beard6.map b/maps/beard6.map
new file mode 100644
--- /dev/null
+++ b/maps/beard6.map
@@ -0,0 +1,21 @@
+             ###########
+          #!!###########!!#
+         A                 L
+         1                   #
+        #                    #
+       #                     #
+      #    \\\\     \\\\     #
+       #          !          #
+        #         @@        #
+         #                 #
+          ##     **R**     #
+        ... ##            #....
+ ..........  ########W####  .........
+..........B              .............
+..\.........2          ...........\....
+
+  
+Trampoline A targets 2
+Trampoline B targets 1
+Growth 5
+Razors 33
diff --git a/maps/contest1-10.map b/maps/contest1-10.map
new file mode 100644
--- /dev/null
+++ b/maps/contest1-10.map
@@ -0,0 +1,51 @@
+###############################################################I################
+#                                                             #*** \\ #W      W#
+#                      ###############                        #\\\ .. #W      W#
+#                      #\\\.......** ######           #########.##    ##########
+#                      #\\#.#####...##. *7#           #.......\ ..........*   .#
+#                      #\\#.....*##. #  \.#           #*******\......#....#\\ .#
+#                      #\#####\...## #\ * #           ###\.\\\...**..#....... *#
+#         W            #\......####* H  .\#           #*****\\  .\\..##     #\.#
+#                      #\.######* #.\#########        ######### ....  ##########
+#                      #\.#. *...##.## ##    *#               #       #        #
+#                      #\##. ..  *...#  ##6 .*##              ####*####   WW   #
+#                      #\...... F#.#.#   ##\\\\##             #.......#        #
+#                      ###########.#.# W  ##....##    #########  \\\\*##########
+#           ############\..........#.#   ##..\ . ##   #*\\  **#     *..*\ \\\\\#
+#           #..........##.##########.#  ## . G .  ##  #.\**\*** .....**.# \\##\#
+#           #.....*....#5.#\.........# ##\\\# #\\\\## #\8......     .\\.. \\\\\#                                                   
+#           #..\\\\\\..######################  #################################                            
+#           #.     ....#.*..#\.#\\... ......#      #..........................\#                            
+#           #..\\\\\\\.#.\..#\.D##.#. ...*..#      #..\\###...#....        ###.#                            
+#           #..\..    .#.3 .##.# #.#. ... ..#      #..\*\\\.. #.... ..##\\..\#.#                            
+#           #..\.. ....#.\  ...### #.   \ ..#      #..\*\.... #.... ..#\#....#.#                            
+#           #..... ..* #..\  ..#. .#..... **########...\###.. #.... ....#....#.#                            
+#           #..### ### #...\  ##.#\#..... ..\\\*.  #... ..... ..... .####......#
+#           #...4#\#\\.#....\ \#*\\#.###. ####\\\  #\\. #....           .......#
+#           ######E#############\\.#.     ...## \  #... #..#. .....*\ ##.......#
+#                             W#\#.#..... ....# \  #.#....... ...#..  ....######
+#                 ################.#..... ....#    #. ...#... ...#.\  ....#..* #
+#                 #..2...#..***#\\.#..... ....#\   #......... ...#.. #....#.#\\#
+#                 #..*...#..\\\########.. ..###*####.....*... .....*\#\\.....*.#
+#                 #..#...#...**#......... .........#.***.* .......*\****.....#.#
+#       W         #.\.\..C.*.*\#......... ....***..#.\\\.. ................   .#
+#                 ####**.B1....#..\\\\\ # ####.....#.#####    .######    ##### #
+#                 #\.....#######........*R..\\\   .#....\\.................... #
+#                 #\..* .#     ##########A##########....****...#.##.....\\\\..\#
+#                 ########                         #....\\\\...#.........*....\#
+#                                                  #....\\\\...#.\\.    #\###.\# 
+#                                        W         #....     ..#.... ...#\\\\. # 
+#                                                  #........ ..#.... ...#..... # 
+#                                                  #........         ........#9# 
+##############################################################################L# 
+
+Trampoline A targets 1
+Trampoline B targets 2
+Trampoline C targets 3
+Trampoline D targets 4
+Trampoline E targets 5
+Trampoline F targets 6
+Trampoline G targets 7
+Trampoline H targets 8
+Trampoline I targets 9
+Growth 1
diff --git a/maps/contest1.map b/maps/contest1.map
new file mode 100644
--- /dev/null
+++ b/maps/contest1.map
@@ -0,0 +1,6 @@
+######
+#. *R#
+#  \.#
+#\ * #
+L  .\#
+######
diff --git a/maps/contest10.map b/maps/contest10.map
new file mode 100644
--- /dev/null
+++ b/maps/contest10.map
@@ -0,0 +1,24 @@
+#############################
+#..........................\#
+#..\\###...#....        ###.#
+#..\*\\\.. #.... ..##\\..\#.#
+#..\*\.... #.... ..#\#....#.#
+#...\###.. #.... ....#....#.#
+#... ..... ..... .####......#
+#\\. #....           .......#
+#... #..#. .....*\ ##.......#
+#.#....... ...#..  ....######
+#. ...#... ...#.\  ....#..* #
+##........ ...#.. #....#.#\\#
+#.....*... .....*\#\\.....*.#
+#.***.* .......*\****.....#.#
+#.\\\.. ................   .#
+#.#####    .######    ##### #
+#....\\.................... #
+#....****...#.##.....\\\\..\#
+#....\\\\...#.........*....\#
+#....\\\\...#.\\.    #\###.\#
+#....     ..#.... ...#\\\\. #
+#........ ..#.... ...#..... #
+#........         ........#R#
+###########################L#
diff --git a/maps/contest2.map b/maps/contest2.map
new file mode 100644
--- /dev/null
+++ b/maps/contest2.map
@@ -0,0 +1,7 @@
+#######
+#..***#
+#..\\\#
+#...**#
+#.*.*\#
+LR....#
+#######
diff --git a/maps/contest3.map b/maps/contest3.map
new file mode 100644
--- /dev/null
+++ b/maps/contest3.map
@@ -0,0 +1,9 @@
+########
+#..R...#
+#..*...#
+#..#...#
+#.\.\..L
+####**.#
+#\.....#
+#\..* .#
+########
diff --git a/maps/contest4.map b/maps/contest4.map
new file mode 100644
--- /dev/null
+++ b/maps/contest4.map
@@ -0,0 +1,9 @@
+#########
+#.*..#\.#
+#.\..#\.L
+#.R .##.#
+#.\  ...#
+#..\  ..#
+#...\  ##
+#....\ \#
+#########
diff --git a/maps/contest5.map b/maps/contest5.map
new file mode 100644
--- /dev/null
+++ b/maps/contest5.map
@@ -0,0 +1,15 @@
+############
+#.....*....#
+#..... ....#
+#..\\\ \\..#
+#.     ....#
+#..\\\ \\\.#
+#..\..    .#
+#..\.. ....#
+#.....  .\ #
+#.....  .\ #
+#...@.  .*\#
+#....@  .*\#
+#..### ### #
+#...R#\#\\.#
+######L#####
diff --git a/maps/contest6.map b/maps/contest6.map
new file mode 100644
--- /dev/null
+++ b/maps/contest6.map
@@ -0,0 +1,15 @@
+###############
+#\\\.......** #
+#\\#.#####...##
+#\\#.....*##. #
+#\#####\...## #
+#\......####* #
+#\.######* #.\#
+#\.#. *...##.##
+#\##. ..  *...#
+#\...... L#.#.#
+###########.#.#
+#\..........#.#
+##.##########.#
+#R.#\.........#
+###############
diff --git a/maps/contest7.map b/maps/contest7.map
new file mode 100644
--- /dev/null
+++ b/maps/contest7.map
@@ -0,0 +1,9 @@
+    #######
+    ##    *#
+     ##R  *##
+      ##\\\\##
+       ##....##
+      ##..\ . ##
+     ## . L .  ##
+    ##\\\# #\\\\##
+   ######   #######
diff --git a/maps/contest8.map b/maps/contest8.map
new file mode 100644
--- /dev/null
+++ b/maps/contest8.map
@@ -0,0 +1,18 @@
+##############
+#\\... ......#
+###.#. ...*..#
+  #.#. ... ..#
+### #.   \ ..#
+#. .#..... **#######
+#.#\#..... ..\\\*. #
+#*\\#.###. ####\\\ #
+#\\.#.     ...## \ #
+#\#.#..... ....# \ #  
+###.#..... ....#   ##
+#\\.#..... ....#\   # 
+########.. ..###*####
+#......... .........#
+#......... ....***..#
+#..\\\\\ # ####.....#
+#........*R..\\\   .#
+##########L##########
diff --git a/maps/contest9.map b/maps/contest9.map
new file mode 100644
--- /dev/null
+++ b/maps/contest9.map
@@ -0,0 +1,17 @@
+        #L#######
+        #*** \\ #
+        #\\\ .. #
+#########.##    ##########
+#.......\ ..........*   .#
+#*******\......#....#\\ .#
+###\.\\\...**..#....... *#
+#*****\\  .\\..##     #\.#
+######### ....  ##########
+        #       #
+        ####*####      
+        #.......#
+#########  \\\\*##########
+#*\\  **#     *..*\ \\\\\#
+#.\**\*** .....**.# \\##\#
+#\R......     .\\.. \\\\\#
+##########################
diff --git a/maps/flood1.map b/maps/flood1.map
new file mode 100644
--- /dev/null
+++ b/maps/flood1.map
@@ -0,0 +1,12 @@
+###########
+#....R....#
+#.*******.#
+#.\\\\\\\.#
+#.       .#
+#..*\\\*..#
+#.#*\\\*#.#
+#########L#
+
+Water 1
+Flooding 8 
+Waterproof 5
diff --git a/maps/flood2.map b/maps/flood2.map
new file mode 100644
--- /dev/null
+++ b/maps/flood2.map
@@ -0,0 +1,10 @@
+#######
+#..***#
+#..\\\#
+#...**#
+#.*.*\#
+LR....#
+#######
+
+Flooding 5
+Waterproof 3
diff --git a/maps/flood3.map b/maps/flood3.map
new file mode 100644
--- /dev/null
+++ b/maps/flood3.map
@@ -0,0 +1,16 @@
+############
+#..........#
+#.....*....#
+#..\\\\\\..#
+#.     ....#
+#..\\\\\\\.#
+#..\..    .#
+#..\.. ....#
+#..... ..* #
+#..### ### #
+#...R#\#\\.#
+######L#####
+
+Waterproof 10 
+Flooding 10
+Water 2
diff --git a/maps/flood4.map b/maps/flood4.map
new file mode 100644
--- /dev/null
+++ b/maps/flood4.map
@@ -0,0 +1,23 @@
+########################
+#.....................\#
+#......*\   ...........#
+#......*... ......* ...#
+#..   \\... .*..... ...#
+#.. ....... ....... ...#
+#.. ....... .\\.... ...#   ######
+#.  ....      .....\...#   #\\\\#
+#\\\......... .........#   #....#
+###########     R      ########*#####
+          #.......... ........***\\\#
+          #.......... ............**#
+          #.......... ......... *.*\#
+          #....\\.... ....\\..... ..L
+          #.....................****#
+          #........\*...............#
+          #...........     .........#
+          #.........................#
+          ###########################
+
+Water 1
+Flooding 20
+Waterproof 10
diff --git a/maps/flood5.map b/maps/flood5.map
new file mode 100644
--- /dev/null
+++ b/maps/flood5.map
@@ -0,0 +1,13 @@
+#########
+#.*..#\.#
+#.\..#\.L
+#.R .##.#
+#.\  ...#
+#..\  ..#
+#...\  ##
+#....\ \#
+#########
+
+Water 2
+Flooding 11
+Waterproof 5
diff --git a/maps/full/full1.map b/maps/full/full1.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full1.map
@@ -0,0 +1,9 @@
+    #######
+    ##*   @#
+     #\R .*##
+      ##\\\\##
+       ##....##
+      ##@.\ @ ##
+     ##*. L .  ##
+    ##\\\# #\\\\##
+   ######   #######
diff --git a/maps/full/full10.map b/maps/full/full10.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full10.map
@@ -0,0 +1,51 @@
+###############################################################I################
+#                                                             #*** \\ #W      W#
+#                      ###############                        #\\\ .. #W      W#
+#                      #\\\.......** ######           #########.##    ##########
+#                      #\\#.#####...##. *7#           #.......\ ..........*   .#
+#                      #\\#.....*##. #  \.#           #*******\......#....#\\ .#
+#                      #\#####\...## #\ * #           ###\.\\\...**..#....... *#
+#         W            #\......####* H  .\#           #*****\\  .\\..##     #\.#
+#                      #\.######* #.\#########        ######### ....  ##########
+#                      #\.#. *...##.## ##    *#               #       #        #
+#                      #\##. ..  *...#  ##6 .*##              ####*####   WW   #
+#                      #\...... F#.#.#   ##\\\\##             #.......#        #
+#                      ###########.#.# W  ##....##    #########  \\\\*##########
+#           ############\..........#.#   ##..\ . ##   #*\\  **#     *..*\ \\\\\#
+#           #..........##.##########.#  ## . G .  ##  #.\**\*** .....**.# \\##\#
+#           #.....*....#5.#\.........# ##\\\# #\\\\## #\8......     .\\.. \\\\\#                                                   
+#           #..\\\\\\..######################  #################################                            
+#           #.     ....#.*..#\.#\\... ......#      #..........................\#                            
+#           #..\\\\\\\.#.\..#\.D##.#. ...*..#      #..\\###...#....        ###.#                            
+#           #..\..    .#.3 .##.# #.#. ... ..#      #..\*\\\.. #.... ..##\\..\#.#                            
+#           #..\.. ....#.\  ...### #.   \ ..#      #..\*\.... #.... ..#\#....#.#                            
+#           #..... ..* #..\  ..#. .#..... **########...\###.. #.... ....#....#.#                            
+#           #..### ### #...\  ##.#\#..... ..\\\*.  #... ..... ..... .####......#
+#           #...4#\#\\.#....\ \#*\\#.###. ####\\\  #\\. #....           .......#
+#           ######E#############\\.#.     ...## \  #... #..#. .....*\ ##.......#
+#                             W#\#.#..... ....# \  #.#....... ...#..  ....######
+#                 ################.#..... ....#    #. ...#... ...#.\  ....#..* #
+#                 #..2...#..***#\\.#..... ....#\   #......... ...#.. #....#.#\\#
+#                 #..*...#..\\\########.. ..###*####.....*... .....*\#\\.....*.#
+#                 #..#...#...**#......... .........#.***.* .......*\****.....#.#
+#       W         #.\.\..C.*.*\#......... ....***..#.\\\.. ................   .#
+#                 ####**.B1....#..\\\\\ # ####.....#.#####    .######    ##### #
+#                 #\.....#######........*R..\\\   .#....\\.................... #
+#                 #\..* .#     ##########A##########....****...#.##.....\\\\..\#
+#                 ########                         #....\\\\...#.........*....\#
+#                                                  #....\\\\...#.\\.    #\###.\# 
+#                                        W         #....     ..#.... ...#\\\\. # 
+#                                                  #........ ..#.... ...#..... # 
+#                                                  #........         ........#9# 
+##############################################################################L# 
+
+Trampoline A targets 1
+Trampoline B targets 2
+Trampoline C targets 3
+Trampoline D targets 4
+Trampoline E targets 5
+Trampoline F targets 6
+Trampoline G targets 7
+Trampoline H targets 8
+Trampoline I targets 9
+Growth 1
diff --git a/maps/full/full11.map b/maps/full/full11.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full11.map
@@ -0,0 +1,153 @@
+###################################################################################################
+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
+#@........................................\\!.....................................................#
+#@.......................................\.\\\....................................................#
+#@.......................................\   \!!...!!..................\\\........................#
+#@......................................\.  .\\\..\\\..............!!..\\\\\!.....................#
+#@......................................    .\ ..!\ \..........!!\\\\!..\ \\\\\...................#
+#@......................................       \.\  \..\\\\\\\\\\\\  \.\\     \...................#
+#@......................................\\    \\\\ \!.\\\\\\\         \\      \...................#
+#@......................................\\    \\\  \\\\                      \\...................#
+#@...................................\\\\\         \\\.                     \\....................#
+#@...................................\\\                                    \.....................#
+#@...................................!\\                                    \\....................#
+#@....................................\                                      \....................#
+#@....................................\                                      \....................#
+#@.................................\\!.\                                    \\....................#
+#@...............................\\ .\.\\                                  .\.....................#
+#@...............................\\   \\\                                 .\......................#
+#@................................\\                                    \\\.......................#
+#@................................!\                                   \\\!.......................#
+#@................................!\                                   \..........................#
+#@................................\                                  .\!..........................#
+#@..............................\\\                                 .\............................#
+#@..............................\\                                 \\.............................#
+#@...............................\                               .\\..............................#
+#@........................!!.....\. \  \                       .\\\...............................#
+#@........................\\\\.\\\\ \  \\  \\\\               \\\\................................#
+#@......................\.\  \\\\\\\ \ \\ \                  \\...................................#
+#@......................\\\   \\\. \\  \\                   \\....................................#
+#@......................\\\   \\\\ .\\ \\                 \\\.....................................#
+#@......................\\\    \\\  .\                 .\\\!......................................#
+#@....................\\\\                        ..   \\.........................................#
+#@....................\\.                         \\\..\\....!!...................................#
+#@.....................\\                         \\\\\\\....\\...................................#
+#@......................\                           \\\\\!!!\\\...................................#
+#@......................\.                            \\\\\\\\....................................#
+#@......................\\                            \\...\\.....................................#
+#@....................\\..\                          \\\..\\.........\\!..........................#
+#@...................\\\\.\\                      \\\\.\\\\.......\\\\\\..........................#
+#@...................\  \\\\                     \\\\\\!\\.......\\.   \..........................#
+#@...................\   .\\                    \\\\\\\........\\\     .\.\\\!!!!.................#
+#@...................\                          \\.. \\.....\\\\\       \\\\\\\\\\!...............#
+#@...................\                            ..\\!.\\\\\\.         \\       .\\.\\\\\\\\.....#
+#@...................\  .\                      \\\\\..\\\\\                      \\\\\\\\\\\\!...#
+#@...................\.\\\..\\                 .\.....\\                                     \\...#
+#@...................\\\\\\\\\                 \\\\\\\\                                       \\..#
+#@....................\\\\\\\\                 \\\\.                                           \\.#
+#@...................\\\\\\\                       \\   **                                      \.#
+#@..................\\\\\\\                        \\  ****                                     \.#
+#@..................\\\\\\\.                     \    ******                                    ..#
+#@.....................\\\.\                     \    \\\\\\\                                   \.#
+#@....................\\.\.\                     \  \ \\\\  \ \                                 ..#
+#@....................\  .\\                                                                   .\.#
+#@......................  .\                                                                  \\\.#
+#@..................!\\\\\                                                                   .\...#
+#@..................\\\\\\\                                                      \\\     \\  \....#
+#@..................\  \\\\                                                  \ \ \\      \\ \!....#
+#@.................\\\\                                                                  \\ !.....#
+#@.................\\\\\                                                                 \\\!.....#
+#@.................. \\\\                                                                  \......#
+#@.................   \\\                                                                 \\......#
+#@...............\\                                                                       \.......#
+#@...............\.                                                                       ........#
+#@...............\\\                    \\ \                                              ........#
+#@.........!!!!..!\\             \\\\   \  \  \\\                                         ........#
+#@........\\\\\\\\\               \\    \  \  \\\                                        \........#
+#@........\   .\\\           \\. \\                                                    \\\........#
+#@........\                 \\.. \\                                                    \..........#
+#@........!\\\\\\\\\\\\    \\.\.                                                       \..........#
+#@.........!!\\\\\\\\\\   .\\\\                                                        ...........#
+#@...........\..\\\\\\\   \.\.                                                        \...........#
+#@..........!\\\.       .\..\                                                       \\\...........#
+#@..........\\.\        \\\\\                                                      \\.............#
+#@...........\\.       \\.\                                                       .\..............#
+#@............\\\\.  .\\.\\                                                       \\..............#
+#@.............!\\\\\\\.\\                                                        \...............#
+#@................\\\\..\\                                                       \\...............#
+#@.....................!\                                                        \................#
+#@.....................\\                                                        !................#
+#@.....................\                                                        \!................#
+#@.....................\                                        \\   \\        .\.................#
+#@.....................\                                       \\\   \\\\    .\\..................#
+#@..................!!\\                                               \\ ..\\\...................#
+#@.................\\\\.                                 \\          ..\\\\\\\....................#
+#@.................\ \.                            \     \\      \\\\\\\\\\.......................#
+#@..................                                 \\\        \\................................#
+#@..................                                  \\      \\\.................................#
+#@..................                                         .\\\\\\\\\\\.........................#
+#@.................\       \\\\\\                            .........\\\!........................#
+#@.................\     \\\\\\\\                  \\\                \\\\\.\.\...\...............#
+#@................\\   .\\\\\\\\.    \\   \\   \   \\\                  \\\..\\..\.\\..\..\.\\....#
+#@..............\\\\  .\\.\.   ..    \\\   \   \   \\\                  \\.\\.\....\\.....\.\\....#
+#@..............\\    \\..\    ..   \\\     \ \  \ \\\   \       \         \W.....................#
+#@.............\     \\..\.    \.                        \\\\   R\\..   .L.\\.....................#
+#@.............\    .\..\\\    \.                      \\\ \\  \ \\\\\\\\\\\......................#
+#@.............\    ...\\ \    \\                      \\        .\...............................#
+#@.............\    ...\  \   \W\\                 \\\\\\\\     \\................................#
+#@.............\     \.   \\  \..\\\               \\WWW.\\\\\\\\\................................#
+#@.............\     \.. \\\  \....\\              .\\W...W\\\\\\.......\\\W......................#
+#@.............\\    \W\\\\\.\..\\\.\                \\\\....\\\......\\\\\\......................#
+#@.............W..\\ .#\\..W\\..\.\\\   \\             .\\\\.........\\\.  .......................#
+#@..............\\\\ 1#.......... !!!!  \\            \\  .\\\.......\.B   \\\....................#
+#@...............\\  \#.......... \!!!                \\    \\\WWWW\\\     .\\W...................#
+#@.............\\\ .\\.........W.!!!!\! \ \                   \\\\\\         \\W..................#
+#@............\\   \\..........\.! \        \    \  \  \                      .\\.................#
+#@............\   \............\ !               \\\\  \\  \                    \\\\..............#
+#@...........\\  \\............\.!               \ \\  \\                          \\.............#
+#@..........\\.  \............\\ !                          \                      .\.............#
+#@..........\.   \............\!\\                                                  .\............#
+#@..........\   .\............\\\\      \\                                           \............#
+#@.........\    \W.............\\.   \ \\\                                          \\............#
+#@.........\   .\.................                                                 \\.............#
+#@........W.  .\.................\.          #########################            \\..............#
+#@........\.   \.................\\          #  **@***@**#...*      2#            \...............#
+#@.......\\    \..................\          #  .\.\.\.\....\#     ###          \\\...............#
+#@......\\     \..................\         ##   \\\\\\ ######     #           \\\................#
+#@......\      \.................\\         #                #     #           \..................#
+#@.......      \...............\\\         ##   #######   ####     #           \\.................#
+#@......\     \\..............\\.         ##      \*\@##  \\\#     #            \\................#
+#@......\\...\\W..............\           #   ......#..#.A \\#   ###             \\...............#
+#@.......\\\\W...............\           ##  #   ####  #######   #                \...............#
+#@..........................\\           #   #         ! .    \###              .\\...............#
+#@..........................\            #\*\#   .....   .   #\#              \\\\................#
+#@.........................\            ##**\    .........   #\#            \ \\\.................#
+#@........................\\            #\\\\       \.........##          .\\\\...................#
+#@.......................W\             #######################          \\\\.....................#
+#@......................W\.                                            \\\.W......................#
+#@.....................W\.                                            \\\.........................#
+#@.....................\.                  \\\    \\\\               .\W..........................#
+#@.....................\                  \\\\    \\\\               \............................#
+#@.....................\                                           .\\............................#
+#@.................\\..\                                           \\.............................#
+#@.................\\..\                           ..           ..\\..............................#
+#@.................  \.\ \                         \.          .\\\...............................#
+#@.................  \\.\ \\\   \\                 \\          ...................................#
+#@.................  \\ \ \\\\    \                \\\\\\\\    ...................................#
+#@.................\ \\                            \WW\\\\\\...\..................................#
+#@.................\\             \\\             \\.......\\\\\..................................#
+#@..................\   \\        \\\\.  .       .\...............................................#
+#@..................\\  \\\\      \..\\\ \   \\\\\................................................#
+#@...................\  \.W\\     \..W\\ \. \\\\\.................................................#
+#@...................\. \...\\    \....\.\\.\.....................................................#
+#@...................\. \....\\   \....\\\\\\.....................................................#
+#@...................\\ \.....\\  \...............................................................#
+#@....................\ \......\\\\...............................................................#
+#*......................\.......\\\...............................................................#
+###################################################################################################
+
+Water 1
+Flooding 1000
+Waterproof 100
+Trampoline A targets 1
+Trampoline B targets 2
diff --git a/maps/full/full12.map b/maps/full/full12.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full12.map
@@ -0,0 +1,157 @@
+########################################################################################################################################################################################################################
+#\\\\\\\\\\..\............................................................................\\\\\\\     \      \           \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\......\\\\...........................................\.#
+#\\\\\\\\\\\.............................................................\................\\\\\\\     \\...........      \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.....\.\\\..............................................#
+#\\\\\\\\\\\..\...........................................................................\\\\\\\    ..\..............   \  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\.......\\.............................................\\#
+#\\\\\\\\\.\\\............................................................................\\\\\\\\\\.....\....\\.......\ \\  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\...................................................\  \\\#
+#\\\\\\\\\\.\\............................................................................\\\\\\\\.......................\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\....................................................\\\\\\#
+#\\\\\\\\\\\.\............................................................................\\\\\\.................\......... \\\\\\\\\\\\\\\\\\\\\\\\\\\..\\\...................................................\\\\\\\\#
+#\\\\\\\\\\\\\............................................................................\\\\\.........\.\\..\.\\\..\....\.\\\\\\\\\\\\\\\\\\\\\\\\\.........................................................\ \\\\\\ #
+#\\\\\\\\\\\\\............................................................................\\\\......\.. \\........\.  \\ ...\\\\\\\\\\\\.\\\\\..\.\.........................................................\\\\\\\    #
+#\\\\\\\\\\\\\\...........................................................................\\\\..\..\.\.\\....\\\..\ ......\..\\\\\\\\\\\\\\\\\\\\.\........................................................\\\\\\\     #
+#\\\\\\\\\\\\\............................................................................\\\..\..\..\\......\.....\\\.\\\\\..\\\\\\\\\\\\\\\\\\\\\....................................\\\\\\\............\\.\\\       #
+#\\\\\\\\\\\\\\..............................................................................\..\.\\ . ...\ ! . !!!\.... .\\\.\\\\\\\\\\\\\.\\\\..................................\...\\\\\\\...........\\\\\\\        #
+#\\\\\\\\.\\\\..............................................................................\\\ ...\..\.\.\\..\   .. .\\\..\..\\\..\\\\\\\\\\\\\\\\..............................\\..\\\\\\..........\\\\ \\\\         #
+#\\\\\\\\\\\\\\...........................................................................\.\\.\. \     .... .\....\ \.!.\!. ..\\...\\\\\\\\\\\\\\\\\.\............................\\\\\\\..........\      \\          #
+#\\\\\\\\\\\\\\............................................................................. \!\ \ \\\.  !\\............  \ \\..\...\\\\\\\\\\\\\\\\..........................\...\\\\\\............        \          #
+#\\\\\\\\\\\\\\...\.......................................................................\\ \\\ \\\ .!.\....\\\.\  !!!!...\ ....\..\\\\\\\\\\\\\\\\\............................\\\\\\.............        \          #
+#\\\\\\\\\\\\\\.......................\\\\\\\\\\\\\\\\ \\\\\\\\                           .\\ \\\\ .#.##\!\\\...\!! ..!!! \. \...\\\\\\\\\\\\\\\\\\\\...\\\................\...\\\\\\..............\        \          #
+#\\\\\\\\\\\\\\.................\ \\                                                     \\ \ \\.  \ . \.!\!### \\\   !\..! \.....  \\\\\\\\\\\\\\\\\\.\\\................\...\\\\\................\        \          #
+#\\\\\\\\\\\\\\....\...\.\.......\\\\                                                    .\\\\  \! .!.\!\ # .!\\ !###!\ !!!\ .....\\\\\\\\\\\\\\\\\\\........................\\\\\.................\        \          #
+#.\\\\\\\\\\\\\........\.....................................................\.\\\\\\\\\\\ \ . \! \!\.!#\\!##!##### .!!!#!\# ...\.\\\\\\\\\\\\\\\\\\\\\\\\\............\...\\\\\...................\        \          #
+#..\\\\\\\\\\\\..\\\...\......................................................\\.\.\\\\\\.\. ! ! .!\! \\!#!###!###!!#!! # !\\.  ...\\\\\\\\\\\\\\\\\\\\\\.................\\\\\....................\        \          #
+#\\..\\\\\\\\\\..\\\.................................................................\\\\. \.  ! #\\#! # #######!!!! \\\...\\..\...\\\\\\\\\\\\\\\\\\\\\\...........\...\\\\\......................\        \          #
+#\\\..\\\\\\\\\..\\\...\..............................................................\\\.  \\! #!!##########!.........!..\...\\..\\\\\\\\\\\\.\\.\\.......\.......\\\..\\\\.......................\        \          #
+######..#######...##...##.....................................................#..########.. . !#!!!#! ####! ......  ... ........ \.#####################.........#####.###.........................#        #          #
+########.######....#....##....................................................##.#.######..!.\\!  #!!### \.\.....!\ !\... ... \.\..####################...####..#   ##.##..........................#        #          #
+#########.#####..##......#..........................................................#..###\!\ !! ## *#\..\ \..!....\.\.\..\\\.\....####################..##...#      ##............................#        #          #
+####  # ##.####..###............................................................#.#.###### ..!!!#*!*#\..\ \....\ ..... .\ \\....\..##################...###.#####..................................#        #          #
+###   #  ######..###..........................................................#.....#.#### \\!! *###\.\.... ....\......\..\....\...####################.##########.................................#        #          #
+###       #####...##..................................................................#.## \ !##!!\\ \\.  \ ! ..\\.\\..\\...\\.\.\.#########################.##....................................#        #          #
+###      ######..#........................................................................!    ! \\\\. .....\\..   ... .\\\ . ...!#....###########..................................................        #          #
+###      ### ##..##....#...........................................................#######!\! !# \  .\\.. ..... .... \!!\ !..... . ###############################..................................        #          #
+##W      ###  #..###...#............................................................#.####\!##!!!. \! !. ! ...\.#.\... .. ...\ \ \##### #########################...................................        #          #
+##        ##  ######...............................................................##.....  # !#\\ \.\.\\.\.. #..\ ..\\\..\\\.\\.\#############################.....................................        #          #
+##        ##  #.####...#.........................................................####.####!!###\ !!!  !!\.......#.. .... ..\\ .... #  #########################.....................................        #          #
+##        ##   .####...#........................................................#.##.##\..#!!!\.\ \\ \.\ \ .!!\.#   \........\.\. ..!###  #####.###.................................................        #          #
+##        ##   .##.#...#.........................................................#...#.!!.#!#!  \!   ..\ \\..........\..\........ . !.#####..#####..................................................        #          #
+##        ##   ####....................................................................!# !!!\!\\\.  \.\  \!.\. !#.\\\\.....\...\#\ !. ###...####..#................................................        #          #
+#         ##   #####...##............................................................#.! #### \ \.\  ..\.  \..... ....\  ...\  ..! ! ###  #..#######................................................        #          #
+#         ##   #####.............................................................######.!#!#!\.\ !!\.\#..\\ #.\.\ ! !!\.\.!!#!!..!!\\ #   #.##......................................................#       #          #
+#         ##   #####.........................................................###.######. ### \   ###*! \.\.\\  #! #\.\\  ##!!! \.!#\. #   #.#..#....................................................#       #          #
+#         ##   #####.......................................................############.\ #!!\\#.#!!######!#*#**#####*####!! # ..!#\# #   #.........................................................#       #          #
+#         ##   ###............................................................##...####. \#! \\####!!#*****#*#!! #!***##*#\###  .# \#     #.##......................................................#       #          #
+##         #   #####...............................................................#####!\ #\\#!*####****#***# .. !######## #!!\.!.#      #.##.#...#................................................#       #          #
+#         ##   #####............................................................########...#!\.\ ##*##########\..\!#######!#!! \\ \       #.........................................................#       #          #
+#         ##   ### #..........................................................###########!\! !.\ !#########*#\...\\#######!!!!!. \.       #.......#.................................................#       #          #
+##        ##   #####..........................................................#.#########.!! \ .. !#########L\\..\\\######!!# \ .. #      #................#........................................#       #          #
+#          #   ###.#..#......................................................#############\! \! ...\\!#####!  \....\\#####\  \.\ .        #...............#.#.......................................#       #          #
+##         #   ### #..#......................................................#############\\!.!  \!\..\\.\\  ! ..\  .. !! \\\ \\ .        #.........#.......##.................................#....#       #          #
+#          #   ### #.##......................................................########### #. !\\\!\   ...\\\ !! \   .\  .  .....\\#        #..#....#.#.#.....#.......................................#       #          #
+#          #   ##  #..#......................................#........###.############## ##     !!\\ \..\. !\\\..\ \!  \\..     .         #...........#........................................#....        #          #
+#          #   ##  #.....................................#..............#..############# # #   !\\\\......!\\ \... .\\\\.\\ !\.            ....#.....##.....###.....................................        #         ##
+#          #   ##  #.....................................#..#.........################## ## # \  \ .\..\.\\\.....!..\!!.\ .  \.            .......#.................................................        #         ##
+#          #   ####...#..............................#.......#........#################      \ \    \ \\\\.#*#. \ ! \.\\ \  !...           .......####......#...#...................................        #         ##
+#          #   ### #..#...............................#.#.#.##.....#....###############     .  !\!!!\ !!#\.##*##!!#!! \!.\   \..          #.........................................................        #         ##
+#          #   ###  #.#..........................##...#..#####.......##################    ..!   ! !#\ ...\ ##*#####\\\\  ! \. \\!.        .........................................................        #         ##
+#          #   ##   #.#.......................#.....#...######..#.....#################   \ !#\ !!!!  !.\  \######!#.   . \ \\!!\! ..      .........................................................        #         ##
+##         #   ##   #...@@@@@@@@...................####.######..#..##.#################  !#  #!!     \ \\! ! #####!! !\\..\  \#   !\.\\..  ...@..................@.@@@@@@@@@..@@@@@@@@@@@.@@@.@.@@@.        #         ##
+#          #   #### ..#.@@@@@@@@....................##########..#..#..############### ##!##!##\\ !\!!\.\ \\...###!.  !.\. \! \!  \.\..\...\@..@...#...#..........@@@@@@@@@.@@.@@@@@..@@@@.@@@@@.@@@.        #         ##
+##         #   ## ##..#.@@@@@@@@.................#...##########.#.##################\   !### #!\! ! \\####!!# #*#!## !*# \   ##!!! \.\@..\...\.....................@@@@@@@@@@@@@@@@@@@@@@@.@..@.@@@.        #         .#
+#....###   #   ##   #.#.@@@@@@.........#.......#...############.##################\@ ! ..##!!## !! !! ####!#!*###*#!!!## ! \ ##! \......! ..@..@@.....#...@...@....@@@@@@@@@..@@@@@@@@@@@.@@@...@@@.        #         .#
+#.......####   ##   #.#.@@@.@...#.............#################.##############..  !!  .@\!#!##*\   !  @. . .@\@@!@. !..\   \!*#\@@......\.......\........@@@@@....@@@@@@@.@.@..@@@@@@@@@@@@.@...@@@.        #         .#
+#.##......##   ##   #.#.@@@..@................####.############.############... .   \ !@@.!!!#*! #  !\..@  #!!.\ #!!@.\\  . ##  \......@.@@@!\\\.\ ..@@@\@@.\..\.@@@@@@@@@....@@@@@@@@@@@.@@....@@@.        #         .#
+######.###.#   ##   #.....@@@@.............@....########################@@@.@... .@.@....\!###*!!!! \\@... ########\ \\\\\\#*#!!\.  .\ .\\..@@@@@@.@@@... !  .@.\.@@@@@@@@..@@@@@@@@@@@@..@@@@..@.@#        #        #.#
+#   #   ##.#   #  ###.#.@.@.@...##...#...@@....#####################.@....\ \\   \\\\\..!\\  #*#!#!! ! \.@..\.#!!.!@@@\!! !!*# \..\. \\\.......@@@.@@.@@@@.@@.@ \ .@@@@@@@@@..@@@@@@@@@@..@@....@@@#        #         .#
+#              #  ###.#.@@@@@..#....#......@.@###################.\\..\...\  !#.@@....\...\.\#**#!#!#!  .\..@\\@@.\.@..\\!!**#! .\\.\@@...@.@@.@@.     \\\...\\ \.@@@@@@@..@...@@@@@@@@@..@@@...@@@#       ##   ##.##  #
+#              #    #..@@@@@@@###.#####.@@.@...##############.@.! \\    !@@@@@..\\ @@...     #**###*# ! \\@.@@@@\...... !!#*###!!      !\\\\.@..\......\\!\\\\..\@@@@@..@......@@@@@@.@@..@@....@@@#       ## ...@@@.. #
+#              #    #.@..@@@.#####.#...@.@..@#..###########.\.\   !#\\\!!! !!!  !!...\.\\@ !\ #*#####*!! \\@.....@ \\!  !##*###!## \\.#.@@...!!  !!!.\.\#!  \\\\\..@@@@@..@...@@@@@@@@@@.@@@....@@@#       #..@..@@@@..#
+#              #     #..@..@...#.#.....@.@..##@..##########@...\..@@@@\..\   \..   \.@\ !!!   ***##!!#*#!#!.@\.!\ \ \!!!###### .\\. \\\.\   ! @@@@@@@@@@.@@.\\ ! \@@...........@@@@@@@@@..@@....@@@        #@@@@@@@@@..#
+#              #     #....@@@@......@..@....#...@@#######@!#####!\!.@.\..\.\     \@.\ .\\\@ ###**##!#!##*!# !#      !!####*#!!\\\  # \\    \ \...\\..\\     # .@...........@..@@@@@@@@@@......#.@@@    ### .@@@@@@@@@@.#
+#              #    ##......@@..@@@.@@.@@@.@@.@@....##.##@ \\\ \....   \\.@.    ..\\ \\!\.@\\\!#*##!!!!###*#######*# !!!##*!!\...\...\. \ \ !@@@@@@@ .....\!!!\\...@......#....@@@@@@@@......@....@#  ## #.@@@@@@@@@@@.#
+#              #   ##...@@@.@@...@@@@@@@@@@@@@@@@@...@.##..\\  ! ...@@.  ..@@@@@@@\ !\....   \ ***###*#############!#####**#!\  ! \\@@@@..\#@@.. \ \\\..@@@.\\\\ ! \@@@..@..@.@@@@@@@@@.........@@@.###...@@@@@@@@@@@@.#
+#              #  ##..@@@@@@.@@@.......................### .@@@@....@....\\  \\\...@@@\#.@...\ ***################!!!!*#**##\......\\\\\\\! .@...\\  \...@@\!!!  !\\.@@@.@@@..@@@@@@@@@...@@.@....@@......@@@@@@@@@@@@@#
+#              #  #..@@@@.........@....................###!####\@@@@@@@. !@..\\##\@...@@. \\\  #***##*######*#####!!!!#***#!  \\\. #\\\ \\@......\\\\     .\@.\ !\..@@@@@..@...@@@@@@.@...@..@.@@@.@......@@@@@.@@@@@@@#
+#              #  #.....##.###.@..@@@@.@@..@@..........###@\\!!.\\ \..\ \...@.@. ! \\..\.!\\\..!****##!!!!*****#*###!#***## \\\ # \\\   \.@.   !!     \@@@ ....\........@......@@@@@@@@.@.@..@.@@@.@.......@@@@@@@@@@@@#
+#              #  #.@#    ### ##############...........###.#!\!   \\\. @.\\....\.#\.@@.\\ \\.@. !****####**########!##****!!!!! \ !  \ \\....@.@\.@..\\ \\ .!! . .@..@@.@......@@@@@@@@...@....@@..@.......@@@..@@@@@@@#
+#              #  #@@#     ##    ###########..@@..@.@@###.\ \..@@@.!!!!  \\\\\\\\\#....\..@@@\. \***#####**#####***###****\ \.\..@....\     \.\\\\\\  \\...!  \\   .@\@.@.@...@@@@@@@@@@...@## .@@.........@@@@..@.@.@@#
+#              #   @@#      #    ###########..@......@###. !#! ...@@\! @...\\\.@.@..\.\\\\.\ \@..***#####**#####***####**!@@..\!@@@ \....@@.. ..@@.@\..  !\..\\ \..\\\..@@@@@@@.@@@@@@@.@@@@.#  ...@........@@@@.......#
+#              ## #@.#      #       ########....@@@..@.#.@.! !#!\\  !\@@.\!!!!!.@..\ \....@.\ \.@#***###***#####***#!#***\.\\..@@.@. \..@@@.@ \\\..@....@ \ \\... \ \@.@....@...@@@.@.@@@.@@@.## @@@@@@@@@.@@..@@.@....#
+#                 #@@...##  #     ##########...@.@..@@..@@@.\#!\. \ ### \\\  ..@@.@@\\@\  \@...!R.**##!***#####*****###*#!###! \@@.\# ...\\\ ! !!\..@@@@@@.! .@.\\\.@. .#.@.@@....@@@@..@..@@.@# .@@.......@.@@@@.@@...#
+#                 #@@@.@@####    #...............@..@@# \\\ !!# \..@   !!!! !#!......@@\ ! \\ !\\ *!!##****###*###***#*#!\...\\\\.   \.@@.\!!. \.....\\\\\.@\ ...\\....@@...@@.....@@@@.@...@@@.##.........@@@@@@..@@..#
+#               #@@@@@....###    #............@...@@.@..@..\  \\ .\#!!! .\\!!\\\\@.... .\\\.\!!!##!.!#*#**######*##*#**#.  .@.#.@.   !#!\@@\@@@@@\@.\. !# \\\.  !! @...\..@.@.......@@...@..@@@..#@.......@..@@@@..@@@@#
+#              #@@@@@@.######    #.........@.....@....@.\\ \\!#\\ !  !!@. \.@. .@ \.@@@@\\ \\....@.######*#######!!##***!\..@..@@@@@@.\\ !#\..@..! @@.\..!\.\!#! .@. !.@....@.......@@..@@@.@.................@@@@.@@@@#
+#              @@@@@@@.##  ##    #...............@@..@.@\ \\@@ !##!! @. .@.@. !!..\.. !  ...\!#!! ######*###########****\ .@@@@.. ! .@@.@.\.\! \\@\\.\ .   \ !\ \ !!!!!\@@@@@@....@@....@@@@@@.@#@@...........@@@@@@@@@#
+#             #@@@@@@@@.##  #    #...........@@..@..@..\\\\\!#\ ##.@..@. !!*! \@!!  \.\\\!#!    ..#*##################**.\.@\ !\...@@...\ ##!!! \....\\ @@...@@@@@@@.!#!\\@@@.....@.@@.@@@@@@@@@@@.@.........@@.@@@@@@@#
+#              @@@@@@@..####@ ####............@@.@.....@\ \@.@. \  \\    #.\ .@.\@@....\!\#\\..\!#\##*##*# !####!#******! \\  ! \@.@@@@@.!@@  \\.\\\!#\@@@...@\.#. \\\\.@ @@@....@@...@@@@@@.@.#....@@@@@...@@.@@@@@@@@#
+#              .@@@.#..#####@@@................@......\\@@ !\.\  .\\\.\!\ \ \\.\\@@@.@@@@..\\@@@@\!..!##!\@@. # .\#****###! @@@.\@@@..@@\... \...@.\.\@.....\.@\ . \ @@..\\@@..####.@@@.@@@@.. ##.##.@@@..@@@@@@@@@@@@@#
+#           #  #@@@#.#.### #..@.....................\.\. !\\\@@@\   \#\\@\..\ !!!..........##!!\\\! @.#*! \@@ # @ !**## !\...\@@.@.\  \ !\.@@@@....\!          .  \\ \.@@\\....@@@@@.@@@@@.@.... @..###.@@@@@@@@@@@@.@@#
+#           #   #@@.##..## ##@@..................@@\\.\..@\\@...#\  !\\ .\.. .@.\!...\... \  \\@.!....!#\\..\\!\.\#***#!....\\\@@.@@@@@@#. .@..@@\\. ! .@.#\.@@.@@@@@..\ !..@.@@@.@..@.@.@.@@@@@ @@...##..@@@@.@@@@@@@@#
+##         ##    .@.....## ...@@.................@.@@@\@ \\.....\\\   ..\!@. \@..!.\.@@@.@@.#!.\. @..@.! \.\.\!!\\ ##!..!\\      .@@@.. \@@@   !! ! \@@..!#@@@@@@@@@@@@. !\@.@@@@.....@@@..@@@@@#.@@@@..#.@@.@.@@@@@@@@#
+#          ##    #......#####.@@@................@**#!.......\  !!\.@@\\.!... !\  @@@\\.@.\   .@!#@\@.@\ ..@. !!\ \### \.... @@.##.#...\@@@!!#!!!\\!.\.@...@...#.\\\@@@... \.@@.......@@@@..@.@@.#@@@@@@..@@.@@@@@@@@@@#
+#          ##    @@@....###.#.@..................@@ \\. @\\.@@.\ !!!\@.  \!\.\.@..### ..@@ .@.\\ !.@@@@@! \.\! ! .!!\@@.@.!@...@@@@@...#!!!!#!\@.\\. @\!! !\\\\ \\......@ ! ...........@@@@..@@@.#@...@@@.@@@@.@@@@@@@@#
+#          #.## #@@@@.#####@@@@....................\!!! \.@@.#\@@. !\\!### \\ \\.@ #......... !#@!@..@@@..  ! ....\! \.  \..\ @@@@@.@.  @. !!   \ !!.\!!\...\.\\ \...@.\ ...\.@........@@.....@@@##........@@@@.@@@@@@@#
+#          #.##.@@.@@@@##@......................@@.\\....\..@@@..!\!!!\.\!\\  # @..\!@@.@@...\\!!\.@@@.\. \\. .\\\ #####\...@.\\.....@#\.......\!##! ###\\@@@...! \\ !!   \..\.........@@......@@..@...@@@.@@@@@@@@@@@@#
+###        #@##.@@@@.@@.@@........@............@@ ! \#####!! \\ ! \\ \ #  ! \ .\\\\  \.@@@\ \\!!##  \ ! \ @.\!   \\..\..@\....\\\ \   #!! ..\\\.\##! ##. !\     \!#\..  ..@.\\..........@.@..@@@@..#..@@.@@@@@@@@@@@@@@#
+#         #.@#.@@@@.@.@@.@....@................\@@ !  \\\\ .\\  \.\# \.@... !#!\...@!@@@@@@@@@@.......\ !\.\\  \@. @.. ...@@@@@@....@. \ .\..  !!\  \!#!\@!\.. !#\\\\.@@@.@@.\@.............@@.@@@@.@....@@@@@@@@@@@@@@#
+#         #@@..@@@@@.@@@@@@.@....@@.........@@\\.\ \..@.@. !! \\\.. \  !!! \!!.\!#\!!\.@@@@@..\ !!\..\\   !!\ \\!.\@#!.\.\\\\ \.\\   #\.\\\\ \  !#\... \!\.!! \...@@@\ #! .@@\ ...@................@.@.@.@@@@@@@@@@@..@#
+#   # ##  #@@@@@@@@.@@@@@@@@@@.@.@..@....@..@@.@.@@.\! .\ \..\\\... .\ .@\.  \ !.\.. !.\  \!!!! ###*#! .\\\\ ### .!@.  \\.\\\ \\\.@@#... ....\ !#!.#   \  !\ !!! ! \  .\\ @\   .@.....@.....@.......@@@@@@.@@@@@@@@@@.@#
+##W  #  ###@@@@@@@@@@@@@@@@@...@......@......@\\.@@@@@ !    !\\  \. #  !!! ...!\.@@. *\\\\\ \.   \\.@@@..\\\.###!!.. # !#!  \\\    !! \@@!\...\! \.! !#! # \.\\\!..@.@....\\...\@........................@@@@@@@@@@@@@@#
+#### ####..@@@@@.@@@.@@@..@.@..@.@.@@@@..@..@@@ .@ #!...@..@\\!\\#\@@!..\\ ...@\.\!\@\!\\.@@@@@@@\.\\... ###!*!! \ .\!. \ \\\\..... # \\.@\ \@@\!**!!! !!\..\...@.@@.\\ !  . .\.@....................@@@.@@@@@@@.@@@@.@#
+#####.@@@@@..@@@.@@@@@@@@@@@@..@@..@@@@@@.@.@@... !@\@@..  !#####. ..##! \@@.\!!\ \. !#@.@@@@@@...#\..@\ \ !\# \##!!@@\\@@....\\\\\  \\.!.@@@@...!#*##\!##! \\\\   \..\..@@@. .@\ @...........@......@..@@@@@@@@@@@@@@@#
+#....###..@@..@....@@@@@@@@@@@..@.....@....@...\  .@...\ ! \@\! ..\ !##! \\..\.!#\\!! #\\.@.@@.@@@\\. !!!! \\\.# .!!# ....@.@@....!.@@..@!###!!\ !#### #\!!\ \#!\..@.@..@@@@\@...\\.............@@@@..@.@@@@@@@@@@@@@@@#
+###### ##.@@..@.....@@@@@.@@@@..@.....@...@.\@..!!!#!\.....@.@. \!\.!# \@. ! \\!.!  .@#\..@.  ! \.\@# \  ! !\\#\!##!!!.@@@@@@@@@@@.\@@\!!!!####! \#!\. \@## \!\.#!!!!   @@@@. .@@..#...........@..@@#@.@@@@@@@@@@@@@.@@#
+#########.@@@@@.@@.@@@@@@@@@@@@.@..@@....@.!..@!!!!  ..@@..\..\! \.!#*! \\\\.  .! ! ...##!!\.@@@@.@#@\@...@@.\!#! ..  .@.@@@@.\ !.@.@@.. \  !\## .!*#*## @ !!\@.@!   .@@....@\.@.@@@..............@..#..@@@@@@@@@@@@@@@#
+#########.@....@...@@@@.@@@@@@.@@.@@.@..@. !@@\!#!.\\\#\.@@\ !\.\   #\!! ! .. \#\ !! #\##!! \\@..! . .@\! .@..  ..@\! \ \.!! \.\ ..@...\\\#  \ ! !# \ *. # \     \\\\ \\.\..\\   \\@#@........@...@.....@@@@@@@@@@@@@.@#
+#########.@@.@......@.@..@@.@@@@.@@@@@@@@.\.#*##! \.\ . .\!! #  ! .#! .\.\ !!##\. \\\\\#..@.@@.!###!!! .@@.\ \\!  \..  !!.@. \. \\...@@.\!! !\\\\!\!####@@##\!#!\\\  @.\\\. \  .@\\.............@@......@@@@@@.@@@@.@@@#
+########..@...........@@@@@.@@@@@@....... \@@...\ \..  @. ###.! @\#*#\\\\.\!!!###   ..!#.!!\@@...! !!\\!!!!\@@. !! .\ \.@\ \@@@!.!!\\..!!###   \.@@ ...!\ . \........ @@@@@@..@@.! @.@..................@@@@.@@@@@@@@@.#
+########..@.....@.......@@@@.@@@@@....@.@\!\.\.. \.\!#!\.@. #\. #!*****!\\.\. ###\.@\ ###### @.@\..\@@!........!\\.@@###!\@...# \\\  \\ !  \@@\@.@@..###.!\ \\\\...\#.\\\..\.@@.  @@..@@@@@..........@@@..@@@.@@@@@@@@@#
+########..@@.....@@.@....@@@.@@@@@@..@@!  ..@.@@@@@@@ !! \.@@@\! ###**.!! !!!!.\\ ! .!!!*.@@. !\.@#\!@!##  \\.\ \  \!  \.@..\ *!##  \\\ @@.@@.@. @.@@.###@## \\\.\#!!.@.@@@.@@@@@@....#####.@.@....@@..@.@..@.@@@@@@@@@#
+########..@.....@...@.@@@@@@@@.@@.@@.@###\\......@.\ ###\...\!\@#. #**##!\ \\  # !.!#@@.**   .@..\  \#\@@....\\\  \\  @.@..\.\!\\  ...@@@.@.\\\. \.\\@.###  \ !!\\@ \..@..@\\\@@..@\  @   #.@.....@..@.@@@@..@.@@@@@@@@#
+########..@..@.......@@.@@.@@@@@@@@.\\. \.\#*##.@\\\\\.##!..\\\##**#****###!###! \! @@. #*!..@@..@#!#..@@@@\.@@\ .@@@#!#!\@.@@.@@@@@@@.\.@.@@.@@...@@.#.#! # \.@@ \.@@........@.!!\.\\.# #.@.....@@.@.@...@@.@@@@@@@@@@#
+########..@..@.......@@@@@....@..@.\\\.\.\\\\..!** .@. ### ##.!!** .#####! ## .@@\.\ #  \*.@@@...@ !.@#\ \.@\! .#\\ \@. !\\@..@\....\. ....@.\\. \@@@\.@.\\.!!.  \.@.\.........@@@.. \.@.#  #.@@@@@...@@.@@@@.@@@@@@@@@#
+########..@..@.......@@@@@@.....@@@ \... ... @ @..\!#@@@.\!!# ##!##.###@\ \.@@\!#...\! #@*#@.#@. ! \!.#!!  \\.\.@\\  !#!...\.\! @@.\...@@...\@. .\..  .@@@@@@@.##! @\@.@.@@@@.@@@@@. @.\.@...@@.....@@.@@.....@..@@@@.@#
+########..@@.@........@@@@@......@.@.@.  \..@.\..\.!#*# \..\@@@ @##.####\\@@.. !#*###!#.\##... # \\ **** .\#*## @...#!\@..!\\ #!. .@@@.@@@....@.\\@@@.@\@...@..@.@@\\ !      \\\.@\# \@@@@@@...@.@.@.@.....@@...@.....@#
+########..@..@@........@@@@...\..@.....@..@.\..@..\@..@\\##!\\  **##..@.!*\.@. \ ..@. \!@.@.\\\\..@.\.......@@.\@.\@!! .. @@#!..@@\...@\ \\\\.@  ......\@@@.@@\@\\\\.@@.@.@@@@@@@.@..  .@.@@...@.............@........@#
+########..@@@@@.........@@@@..@.\  \\ ..@\@ @.....!.\.#\@\\ ***!**###@\@*! \@\#! .. .\\\..   .\....\# \.@ .@@...!@   ..\ # # @@..\@@.\....  !#!.@@.@..@..@...@...\\\...@@.........@..@\!!@.......................@.@@..#
+########.@@...@.........@@@.@.! .@@@..@@@.@#\@.... @\#.@@!!  \***##..@.#*.\.!\@.  .!\\ .\.  !@.\.! @ ... !\\..\\!\.@..! \#@..\\...@.\@\!!!## @@@@@@.\@@\@@@@.@...@   ....@...........\..\\\@..................@####...@#
+#######...@@@@@..............@@@.@@......@.\ .@@@@ !. \@@\! \*# *... .\###\..\\\\\.@ !\ .#. *  . @@ !\..#. \ ..#.!! \.! @#\\\..\ ... .\#!..@@@@.@..@.\\..@@..@...@@@..@\\.\@@\ !\...@.@\..@@@.........\.........@@.....#
+########..@.@........@...@@@@..\.@@.\......@\#!!!!!##.@   \ *#*!@@.@..\@..@..@\\.@.....@..@..@.@......@........@......@....@ !\\..\#!##@@..@.@@.@..\......@....@.@.@.@@@.@@@@...@ \.\@\@\.. ..\......\.@...@.........@.#
+########....@@@..........@@@@.\!.@.\@@. !#@.@ !#!!#\!.. \.**#\\\ \\..\.@@..@...@@@........\....\@.......@..............\.\@....\!##!!@.@.@.....@.!..\..\!..@@@@...@@...\@\@ .@.\..@@   ..@. \\..\.......\...........@..#
+###@.@.#...@@@@@..........@@.\@\ !.@@..@.@@@.\\# ! @. \@#*.@*# .@..@. @.@@@@@@.. \\\\.....@@.\.@@@......@..@......@@.....\\  @@\ !##@.......\!.@@.\\\\\.\\.@@@\..\@.\.\....\.@@.@...@@\..@\...\.\..\..@@.....@.....@@@.#
+##.@@@@..@.@.@@..........@@.\. \ @..@@@@..@\..@.\@ \ ...!#\ !@.@@.\\ \@@@@.@@@.\ \ \\.@@..@@.\@...@@.......@@@@..@@@@...@@\@\! \ ##@@@@@.@...\! #..\\.\!\\\.\@..@@@@@@@@..@@.\...@.@ @@@\@@@.@.\..\\..@...........@....#
+##.@@@@@.@@@@@@......@..@@@@\@.@@...@@.....@@..@@@.#.\##*@\!!.@@@. \\@@@@@@@...\\  \.@@@@.\\.@....#...@.....@@..@@...@@@..! \   ## .@@@. !....\\. ! ! .\\\@\.@@.@....@@\  ..  .#.\.@@@\@.@\!!.\..\\\.....@....@.......@#
+##@@@@.@@@@...@@...........!\.\@@.\..@@ \.@.@@@.@@..@. #*@ !.@@@@@\\\.@@\.@@@@@@@@@@@.\\@@@.@@.....@@@@.....@@@@@@@...@@@.\# \!  @\! #\@@@. \@\!!!# \\\\..\@@..@..@@@@@\.\@. !..@.\.\..\@..# .\\.................@.@.@.#
+#.@@@...@@@@..@@.........@..@\..\   ..  \..\@@.@\\@...@#\!!........@@@@@@@......@...@@@@@@@@.@....@...@@.....@@@@@.@.@@@@   \\#  .@@@\\\.\!  \ !!!@\\\ !\...@@@....@.\#.@@@ ..\.@@.\..@@@ \\\.\\....@@.@@......@..@@...#
+#....##....@@.@@........@... \..\.\@@.@\.@@@.\...@.@@.@\.\@..@................@........@@@@@@@..@@@...@@@@@@..@@@.@@.@@@.\ ###!\\.!## \  .  !!##.@..@.\\.\@@..@@....\\## \@ \ !..@ \\@@\@....\\\\\..@..@@......@...@@@@#
+#.........##............@@\. \.\  \\\..\\...@\\@\\..\....@@@@@@...@.........................@@@@@@@..@@.@@@@@@@@@@@@@@@@. \ !!\\.!\\ !!\!####!.\\@\\.@\\... .@@.@@.@\.## .@@\.@@ .\.\.\.@.\ ..\.\\..@@.@@@@.@..@@...@@.#
+#.....#####..##......@@@@.!\..@\ !! ..@@!!.\.@@.... \.\ \@.....................................@@@@......@.@...........@@\##*  !.\ \\!#####.@.@@@.\.\..\ .\..@@...@@...\\@\@  @.\@..!\@...@...\\\.\.@@.@@@@@@.@....@@..#
+#.....####.###......@@..\   \.@\ \! .#  \\...@@@....@..\\.@...............@...@@........@@@@@@@@..@@.@@@@.@@@@@@@@@@@@@@\#!!   #!#!!!##*#!..@@.@.... \\. \\.@@..@..\.@!@..\. !. .@ \!! \\..\!\\\....@@.@@@@@@......@@..#
+#....#######....@@@.@..@.\\.\....   #\.\  # .\\..\\\ @.\!\@@@@........@.@@@............@@@...............\........\..\\. #**!.. \####**#..@.....\.\\ \\!\.\\.\...@..@\!.@\  \.@...@.@... .........@.@@...@.@.@@@@@@@@@@#
+#......###...#.@@@@@.....\\!.@@..@.!##!\.@@@@@..   \..\..@@@@@@@@@@@@@@@@@@@..........@@@.\...@@@.\! @@@@@@@@..............!! #!*!##**#.\..... .\  ! !#\@\.\.\@ @@\. !..!\\\@ \\.! .@@@\ . .!...........###.###........#
+#.....####...#.@@@@@@... !\.@.@. @@.!***###! \\\\. \\.\\\.@@@@@.@@..........@...@..@@.\.@.@@.@@.@......@.@@@@.@@@@.@@@.@\#### ####*#*# !\....   . *#!@. \. ! .....\.\!! ..!@@!\.\..@\\\.\ @.. ##########################
+#.....#####...#.@@@@....@\.\.....@@@@#******#   \@@.!\...\@@@@@@@.@@@@@@@@@@.@@.@@@@.@..@@@@@@@.@@@@@@@@@@@@@@@@..@\\  \####*!##*#**###!#  #\ !!#!\@@.\\.\  !..@\\@  # .\\ !  ..\! .@\ !!!...@##########################
+#..########.@..@@@@@.\\..\\.@.\@..@@@@@********#.\ !\#! \         !!  !!!!!!!!!!!   \...\##    !# \   \  \.\\\.\\.\  ###******###*####\*#####*#@..\.\!!\.  .  ...@\ # .!## \\\\\\   .. \.\  .@##########################
+##########.....@.@@.\.\...\@@..@@\.@@..@@*******###!#...\#....@...@@...@....@...........\.! \ \\.\      \\ !  .\\\.@@@@@#####*#*#*##*######**!\\\.\\@  \\!. #! .\. !# !# #!. \..!@\...\   \.@.##########################
+########.@@...@@@@@.......\..#\...@.\.@.@.!********# \!!!*!#!##! \   \ !!##!! \\\\\\!#*\ @@ #!##!     ! ! ##******##!!  ##******####!##*####\@..   \.!\\!!!!! *\.\##!@\ @@\ !.@\\!!# @@@\\\\..##########################
+###.@@..@.#...@@@@@@....@\!\@ \ ....@@@....@.##********#**@@.@@.\..@..@@..@@@.@...@@@@@.@@@@. \@\!!! ! .@@.@@@@@@@@@..@.!!#####*######**##*\\.@@.  ! ! ! !!! \   !####\\ .!!!@ @\!#  @@@!..@\.@.########################
+###@@@@.#....@@@@@@@..\.@\!#@!!.@.\ ! \\  \@..@@@@.!**#***#######!\\\\\ ###!####*###!!!!#####!!!#!!!!!#############! \\.#*#******####**#### \#!\\\!#!  !###  !!!##*# ##!\. # !..!\!!\.@!.\\.####.#########..############
+##.@@@@@.....@@..@@.....\\!*.\!#@\.\..@.@..@@@.@...@.@..@@@.@.@@..##!! !!##! \\.. !! .\\\\\.....................\ ...\\\ #############****!!## !!#!#!\####****######*##!\ !#\... !!!!\@....@######@.....#.@@.###########
+##@@@@@@....@@@@@.@.....\ #!\.#!#\\\\\#\@..@ .\.@.\\@\\.\..!!!## ..\........\\..\ \@ ## \  !!###!####!\\\\...\\\\  .@@@@.!#########*****#!!#!#!####@ @..*********#####! @\##\@@\\!! !!... .@@@@. ##########.@..#########
+#.@@@@@@...@@@@@...@@@@@\\!\!\  !!#! \\.\..\ \..@@@.\ \.@.\*****!*##******\\\\\.\\ \\!.!*##! \\ !! \\\\\\\\ !!!!!!!!#!######**#****************####!@@@@ ********#****#####.\@! !## !\\. .....@@@@.##...@@@@@@@.########
+#@@@@@@@..@@@@@@.@@@@@@@\\ !#@..!#####  !## !  \\.. \..\\\\@.@@@.\\.\ \@.@ #! \.!\.@@@@@.@.. \\\\\   \ .  *# .@@.@@@@@@.\\..\#########******####!!!!@@@@@************######\@ !\!#!!! \ \\\.@@@@@@@.........@@@@@.######
+#@@@@@@.@.@@@@@@@@@@@@@\ \!!*. \!##*#####! \ .\\#. !!!. ! !!\\\\@\...  \ \...\\\\  ##!  .\\\\.###**######!\!!!! !  \\\\\\\   ##################!#!!! @@@. *#*#**##########!\ .@\#  !! \\...@..@@@.@@@@@@@@@@@...@@@.####
+#@@@@@.#@@@@@...@@@@@@@.   #*!!!\\!####*#** ..\\ \ \ ##!!####*#####*#!!! !###!!! \\.\   \.@@@@@@@\#!\....\!######!       \\\\!###################! !!@@@  *###**####*##### ....@!#   \ \\........@@@.@@@@@@.@....@@@.###
+#@@@@@.#@@@@@@.@@@@@@@@ \!!\**!##\###**##**###**!**#*#!..@.@@@@@@@@@@@@@@..@@..\\  !!!    ! !!!!!!\\!###*!@......@@@@@@@@@...\######*#####!!!!!!!!  !@@\  **#*###*##*#**##!\@\\\\  ! \...........@@@@@@@@.@..@.....@@@.#
+#@@@@@##.@@@@@@@@@@@@@@.\! #*#. *\.! \ \.*#!********#.@@.\.\\\  \..@@@@@.\..@@@@.! .@@@@@@@@.@@@@@@@@@..\!\\\\\@@@..@..@.@@@@@@@.\ ######!#!!!!!!   ! @ !#*######*#*#####  .\\.@    \\\.\.....@@...@@@@@.@@..@@@@@...@@#
+#@@@@.@.@@@@@@@@@@@@@@@\ !!!*** #*\!!  ...@. !!!# *\ .@@@@ @.@@..@@@..@@@@@@@@..@.@.@...@.@@@@.@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@.#**####!!#!!!!!!!! \###*##########***#\. \! .   .\\\\\\\.@@.@@...@@..@..@....@@@@.@@#
+#@@@@.@@@@@@@@@@@@@@@@@\\  \#***\##! . !!.@.\#\.@@.@#   \\ @@@.....@@..@.@@@.@..@.@@@@@@@@@@@@@@@@@.....@.@@@@@@@..\\\ \  !!!#### @..\!##****###*#### ####**#######*#*## @@@.!! ! \.\\\\\..@.@@@@@.@@@@..@..@@...@..@@@#
+#@@@.@@@@@@@@@@@@@@@@@@.  \!\***!!#########!\@\...\*!...\!#@.@@@@@@@@@@@@@@...\!!@############!!  \\..\.@\@....@@....@@@@@@@@@.@@@@@@.@@\!!!!!#!!!!!!!*#*****###*#####*#!\.\\\    .    \\\...@@..@@@..@@@@@..@@@@.#...@#
+#@@@..#@@@@@@@@@@@@@@@@@\ \\@ ***# ##*###*##!\#\.#!!\@@.\#*\..\.\ ! !! \ \\...@@@@@@@@@.@@@@@@@@@@@@@@.@@@@@.@..@@.......\\\ \   !#!! !!!#**########! ******###*###*!@#\.! \.\ ###     \\@....@.@@@@......@@....@.@##..#
+#@@@....@@@@@@@@@@@@@@@@...\@\****#!##**#****##*#*##!#!####..\\ \.\\\.\\\\\!!########!#!########!!!  !###**#\ !#!  !!    \...  .\.......@.\#######! .@*#*****#####!@\\@.# !\  !##!     \.....@.@.@@@@@@..@..@....@@#####
+#@@.@.@@@@@@@@@@@@@@@@@@ .\\ #*****#!##*###*#######*****#** !\....@..\\  ...@..@@.\.\@@. !.@@@@..@@.@.@@@@. \..\\. \!#!\  !!!!#!!!#!########**#####!!#*********##!@@@ @.\@\\!#!!!!!   \......@@@@@@@@@@@...@@....@@@####
+#@@@..@@@@@@@@@@@@@@@@@@. \\!\******#*#*###!\\\...@\*****#\......\\..\ \ !!#   !!!!!###!#!#####*##########. !!!#! \\.\  \...  \    !  \\\.@@\!!!!#!!!##*##*#**##! . \.\!! \!#!!!!!!!  ........@@@@@@@@@@@@@@@.@...@@.###
+#@.@@.@@@@@@@@@@@@@@@@@@@.\ @\#**#******##*\..\ \\\@!****!....@....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@@@@@@@@@..@.@@@@@@..@@@.....!*###########\...@\  !###!!!!!!W..........@@.@@@@@@@@@@@@@.#..@@.##
+#@@...@..@@@.@@@@@@@@@.@.\  \\#***********\  #!\.\.\!##..@@..@@.@....\.\.\\\\    !\ ! !   !  \ \  \ \       ! !!###!##!####!#!!!###################!\.###########\@@@.!#!!!###!!!!\.............@@@@@@@@@@@@@@@@@...@@.#
+#....@..@.@@@@@@@@.@....\\\ \.#*##**********# . !  !*****#*#*****#####!!!#!!!!!  \.\ !  !*!@@.\...@\ \..@.@#!!!!...\.\ \...@..\...@@@...@..@.@@@@@@@@@################!###!###! ................@@@.@@@@@@@@@@@@@@..@@@#
+#........@@@@@@.@@.@....\\\\  #****************!! #*!         !!!!  !! !!!!!!!!!########**\\..\ \\\\\\    !\\@@@@@@@@@.@@@@@@@@@@@@@@@.. \ !###!!##!!!#######################!\...............@....@@@@@@@@@@@@@@@@....#
+########################################################################################################################################################################################################################
diff --git a/maps/full/full2.map b/maps/full/full2.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full2.map
@@ -0,0 +1,15 @@
+############
+#.....*....#
+#..... ....#
+#..\\\ \\..#
+#.     ....#
+#..\\\ \\\.#
+#..\..    .#
+#..\.. ....#
+#.....  .\ #
+#.....  .\ #
+#...@.  .*\#
+#....@  .*\#
+#..### ### #
+#...R#\#\\.#
+######L#####
diff --git a/maps/full/full3.map b/maps/full/full3.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full3.map
@@ -0,0 +1,17 @@
+#################
+# \\\\#   *  *  #
+#  ##   !!#..@. ####
+#*    @.!!####.....#
+#\\   \@...........#
+#\  # .\@    #  #.########
+#\  # ..\@   #  W..   .  #
+#\  # .. \@  #   ..   .@ #
+#\  # *.. \@    #######\\#
+#\  # ###  \@   #     #\\#
+### #       \@  #     ##L#
+#...#@@@*@@**\@ #
+#R ..........!\##
+#################
+
+Growth 25
+Water 2
diff --git a/maps/full/full4.map b/maps/full/full4.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full4.map
@@ -0,0 +1,18 @@
+     ######
+     #....#############
+     #.**.. .. ..*@ \\#
+     #.**..  .  ... \\#
+     #.**..  .    . 3 #
+######.\\......#****###
+#**....*.......#    #
+#\\...BL\\\....#    #
+#A......*****..# 2\C#
+######R.....###########
+     ###.....*.....\\\#
+       #\\\\#..1...\\\#
+       #\\\\#......\\\#
+       ################
+
+Trampoline A targets 1
+Trampoline B targets 2
+Trampoline C targets 3
diff --git a/maps/full/full5.map b/maps/full/full5.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full5.map
@@ -0,0 +1,19 @@
+##############################
+#R...........................#
+#.........................W..#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#............................#
+#..**@*@.*\...*...*...*****..#
+#..*\....*\....*\*..*.\\@\\..#
+#..*\....****..!*!......@....#
+#..*\....*\....*\*..*...*....#
+#..*\....*\...*...*.....*....#
+#............................#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#................ ..... .....#
+#................      W....L#
+##############################
+
+Growth 25
+Razors 10
+Flooding 30
diff --git a/maps/full/full6.map b/maps/full/full6.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full6.map
@@ -0,0 +1,26 @@
+############################################
+#..........................\#..............#
+#..\\###...#....        ###. ..............#
+#..\*\\\.. #.... ..##\\..\#.#..............#
+#..\*\.... #.... ..#\#....#.########  ###  #
+#...\###.. #.... ....#....#.#     \...  ## #
+#... ..... ..... .####......#     \.A.  #\ #
+#\\. #....           .......#     \...\\#  #
+#... #..#. .....*\ ##.......#         \\#  #
+#.#....... ...#..  ....############****##L##
+#. ...#... ...#.\  ....#..* @ .............#
+##........ ...#.. #....#.#\\# ....@    @...#
+#.....*... .....*\#\\.....*.# ....\#\\#\...#
+#.***.* .......*\****.....#.*  ....##1#....#
+#.\\\.. ................   .# .....#.......#
+#.#####    .######    ##### # .............#
+#....\\.................... # .............#
+#....****...#.##.....\\\\..\# .............#
+#....\\\\...#.........*....\# .............#
+#....\\\\...#.\\.    #\###.\# #########....#
+#....     ..#.... ...#\\\\. # #....\\\\**..#
+#........ ..#.... ...#..... # #....\\\\** .#
+#........         ........#R#\#............#
+############################################
+
+Trampoline A targets 1
diff --git a/maps/full/full7.map b/maps/full/full7.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full7.map
@@ -0,0 +1,29 @@
+           ##########
+        ####..******####
+      ###..  3ABCDEF...##
+      ##                 ## 
+     ###                  ##
+    ###.....\\\...\\\.....###
+    #..     \\\ * \\\      ##
+    ##          *          ##
+     ###       ***        ##
+       #*****************##
+       ###..............##
+         ###...........##
+           ####WR..W####
+              ##L####
+               .....
+           ######  ######
+          ##1\! G##2 !\H##
+           ######  ######
+
+Trampoline A targets 1
+Trampoline B targets 1
+Trampoline C targets 1
+Trampoline D targets 1
+Trampoline E targets 1
+Trampoline F targets 1
+Trampoline G targets 2
+Trampoline H targets 3
+Growth 5
+Razors 0
diff --git a/maps/full/full8.map b/maps/full/full8.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full8.map
@@ -0,0 +1,33 @@
+#############################
+#.......*..........  ....\\.#
+#......###........  W\\\....#
+#..   ..............#.......#
+#.....##########.\\\#.####..#
+#..*...........#....#..\\.\.#
+#.*\\.....\.. .##########\..#
+# @ *. .\.... .#....#...\\..#
+# ###. ....\. ......#....\..#
+# #... ..\\\\\\\\\..###.....#
+# #... .          .#....##..#
+# #... ..#. .......#.\\\\\..#
+# ##.. ..#. .####..#..\.....#
+#.\#.. ..# ........#....#####
+#..#.. ... ........#.\\\..  L
+####.. ... ....#.....W\     #
+#......... ....#........... #
+#....#####.....###########. #
+#..............#......#.....#
+#..\#.\.....#######...#.....#
+#..\#.......#.........#.....#
+#...........#.\\\\\...#.....#
+#...####....#.........#.....#
+#.\..\.#.. .#...#####.#.....#
+#..#...#....#..*............#
+#..#.....\..#...............#
+##\\\\### #####.######......#
+#........!!R.....\\..#......#
+#############################
+
+Water 2
+Flooding 40
+Waterproof 10 
diff --git a/maps/full/full9.map b/maps/full/full9.map
new file mode 100644
--- /dev/null
+++ b/maps/full/full9.map
@@ -0,0 +1,29 @@
+###############################################
+#****................#..1...\\\\\\\B..#   @   #
+#R.......############################## ..### #
+#.. ..................................# .***. #
+#.. ........       \            ......# ..\.. #
+#.. .@. ....**.*...#....... ..........#       #
+#.. ... ....\\\\...#.A..... ..........#   #...#
+#.. .@. ....\ .....#..*\\\.    *  \\..#   #...#
+#.. ... ....\......#..* ... ..........#   #...#
+#.. ... ....\......#### ##. ..........#   #...#
+#.. ... ...........#L.# #...........**#   #...#
+#..\\\\\...........#...\#...........\\#   #...#
+########### ############## ############   #...#
+#...*.................................@\\\#...#
+#....*..................        ......#####...#
+#... .*....*.............. ..... .....#\ .....#
+#....*2*........########.. ..... .....#####...#
+#...*...*.......#\\\#..... ...*.......#**#    #
+#.....\\\.......#\\\#....**..***......#\\#  # #
+#....    .......#\\\#*................# ##### #
+#...............#\\\#*...**...*.......#  # #  #
+#...............#.....................#. ..#  #
+######       ############## ### #######. # #  #
+#\\\\\\\\\\\\\\\\\\C\\\\\\\\\\\\\\\\\\*\ # 3  #
+###############################################
+
+Trampoline A targets 1
+Trampoline B targets 2
+Trampoline C targets 3
diff --git a/maps/horock1.map b/maps/horock1.map
new file mode 100644
--- /dev/null
+++ b/maps/horock1.map
@@ -0,0 +1,14 @@
+#####L######
+#....R....A#
+#..........#
+#\.  #@\ ..#
+#\...#*  ###
+#\.........#
+#\..*.@....#
+####@@.  ..#
+#....#.. ###
+#....#..**.#
+#.1..#  .\\#
+############
+
+Trampoline A targets 1
diff --git a/maps/horock2.map b/maps/horock2.map
new file mode 100644
--- /dev/null
+++ b/maps/horock2.map
@@ -0,0 +1,13 @@
+#################
+#A       .@@@@@@#
+#  ..    #*...*1#
+#  .##########*##
+#  ..@   \\\\#* #
+#  ..#   #####*.#
+#   .#####    * #
+#LR .......   . #
+#################
+
+Trampoline A targets 1
+Flooding 10
+Water 0
diff --git a/maps/horock3.map b/maps/horock3.map
new file mode 100644
--- /dev/null
+++ b/maps/horock3.map
@@ -0,0 +1,17 @@
+#################
+# \\\\#   *  *  #
+#  ##   !!#..@. ####
+#*    @...####.....#
+#\\   \@...........#
+#\  # .\@    #  #.########
+#\  # ..\@   #   ..      #
+#\  # .. \@  #   ..      #
+#\  # *.. \@    #######  #
+#\  # ###  \@   #     #W #
+### #       \@  #     ##L#
+#...#@@**@@**\@ #
+#R ..........!\##
+#################
+
+Growth 25
+Water 2
diff --git a/maps/identity.map b/maps/identity.map
new file mode 100644
--- /dev/null
+++ b/maps/identity.map
@@ -0,0 +1,20 @@
+##################################################
+#          @ @                                   #
+#         ##.##                                  #
+#           ...#            A   B      C   D     #
+#   R        ...#            . .        . .      #
+#            #...#  .##.      1          2       #
+#           #..#..###W\#     . .   **   . .      #
+#          #L.# #.97\\\#    E   F  **  G   H     #
+##################################################
+
+Growth   25
+Razors  33
+Trampoline A targets 2
+Trampoline B targets 1
+Trampoline C targets 2
+Trampoline D targets 1
+Trampoline E targets 7
+Trampoline F targets 1
+Trampoline G targets 2
+Trampoline H targets 9
diff --git a/maps/lightning/lightning1.map b/maps/lightning/lightning1.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning1.map
@@ -0,0 +1,6 @@
+######
+#. *R#
+#  \.#
+#\ * #
+L  .\#
+######
diff --git a/maps/lightning/lightning10.map b/maps/lightning/lightning10.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning10.map
@@ -0,0 +1,15 @@
+######L#######################
+#.#.*.**.*.\..#.#.#\.#.\.\.###
+#.\\.\*\\.\.*.#\\*##\#.#.#.\.#
+#.\#\..\..*.\\##\#..\.\.#...##
+#\..\\..##..\*\#\#\*#...*\#.##
+##..##*.#..#.\...#*\\*##..\..#
+#\.\.*..#...\#...*\.\#\*.\*\*#
+#.*.#.R..*.*#.*.....##\...#*.#
+##.#.\.\.#\.*.*..\.#....#*.#*#
+##..\.\..*..\.###.\\..*...\\\#
+#.#\\...*#...#....*.\.\\*..###
+#\..#.*\*.\#*\.#.\\...\..\*\.#
+#..#.##...*#...*.*\#..#.\*\..#
+##.....\..#*####\.##.#*\.*\.\#
+##############################
diff --git a/maps/lightning/lightning11.map b/maps/lightning/lightning11.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning11.map
@@ -0,0 +1,29 @@
+###############################################
+#****................L  *...\\\\\\\\...   *   #
+#R.......###############*############## ..### #
+#.. ..................................# .***. #
+#.. ........       \            ......# ..\.. #
+#.. .*. ....**.*...#....... ..........#       #
+#.. ... ....\\\\...#.\..... ..........#   #...#
+#.. .*. ....\ .....#..*\\\.    *  \\..#   #...#
+#.. ... ....\......#..* ... ..........#   #...#
+#.. ... ....\......#### ##. ..........#   #...#
+#.. ... ...........#\.# #...........**#   #...#
+#..\\\\\...........#...\#...........\\#   #...#
+########### ############## ############   #...#
+#...*.................................\\\\#...#
+#....*..................        ......#####...#
+#... .*....*.............. ..... .....#\ .....#
+#....*\*........########.. ..... .....#####...#
+#...*...*.......#\\\#..... ...*.......#**#    #
+#.....\\\.......#\\\#....**..***......#\\   # #
+#....    .......#\\\#*................# ##### #
+#...............#\\\#*...**...*.......#  # #  #
+#...............#.....................#. ..#  #
+###\##       ###########\##\### ##\####. # #  #
+#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*\ # \  #
+###############################################
+
+Water 2
+Flooding 100
+Waterproof 15
diff --git a/maps/lightning/lightning12.map b/maps/lightning/lightning12.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning12.map
@@ -0,0 +1,26 @@
+############################################
+#..........................\#..............#
+#..\\###...#....        ###. ..............#
+#..\*\\\.. #.... ..##\\..\#.#..............#
+#..\*\.... #.... ..#\#....#.########  ###  #
+#...\###.. #.... ....#....#.#     \...  ## #
+#... ..... ..... .####......#     \.\.  #\ #
+#\\. #....           .......#     \...\\#  #
+#... #..#. .....*\ ##.......#         \\#  #
+#.#....... ...#..  ....############****##L##
+#. ...#... ...#.\  ....#..* \ .............#
+##........ ...#.. #....#.#\\# ....\    \...#
+#.....*... .....*\#\\.....*.# ....\#\\#\...#
+#.***.* .......*\****.....#.*  ....##\#....#
+#.\\\.. ................   .# .....#.......#
+#.#####    .######    ##### # .............#
+#....\\.................... # .............#
+#....****...#.##.....\\\\..\# .............#
+#....\\\\...#.........*....\# .............#
+#....\\\\...#.\\.    #\###.\# #########....#
+#....     ..#.... ...#\\\\. # #....\\\\**..#
+#........ ..#.... ...#..... # #....\\\\** .#
+#........         ........#R#\#............#
+############################################
+
+Flooding 40
diff --git a/maps/lightning/lightning13.map b/maps/lightning/lightning13.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning13.map
@@ -0,0 +1,42 @@
+################################################################L###############
+#         *..                                                 #*** \\ #.      .#
+#        \#\.          ###############                        #\\\ .. #.      .#
+#        \#\           #\\\.......** ######           #########.##    ##########
+#        \#\           #\\#.#####...##. *\#           #.......\ ..........*   .#
+#         #            #\\#.....*##. #  \.#           #*******\......#....#\\ .#
+#         #            #\#####\...## #\ * #           ###\.\\\...**..#....... *#
+#         #            #\......####* \  .\#           #*****\\  .\\..##     #\.#
+#                      #\.######* #.\#########        ##\\##### ....  ##########
+#                      #\.#. *...##.## ##    *#               \       #        #
+#                      #\##. ..  *...#  ##\ .*##              ####*####   ..   #
+#                      #\...... \#.#.#   ##\\\\##      ## ##  #.......#        #
+#                      ###########.#.# \\\\\....##    ##\\\####  \\\\*##########
+#           ############\..........#.#   ##..\ . ##   #*\\  **#     *..*\ \\\\\#
+#           #..........##.##########.#  ## . \ .  ##  #.\**\*** .....**.# \\##\#
+#           #.....*....\\.#\.........# ##\\\# #\\\\## \\\......     .\\.. \\\\\#                                                   
+#           #..\\\\\\..######################  ###############\\################                            
+#           #.     ....#.*..#\.#\\... ......#      #..........................\#                            
+#           #..\\\\\\\.#.\..#\.\\\.#. ...*..\      #..\\###...#....        ###.#                            
+#           \..\..    .#.\ .##.# #.#. ... ..#      \..\*\\\.. #.... ..##\\..\#.#                            
+#      #    \..\.. ....#.\  ...### #.   \ ..#      #..\*\.... #.... ..#\#....#.#                            
+#      #    #..... ..* #..\  ..#. .#..... **####\###...\###.. #.... ....#....#.#                            
+#      #    #..### ### #...\  ##.#\#..... ..\\\*.  #... ..... ..... .####......#
+#      #*   #...\\\#\\.#....\ \#*\\#.###. ####\\\  #\\. #....           .......#
+#      ##   ######\#############\\.#.     ...## \  \... #..#. .....*\ ##.......#
+#      ##\                    \#\#.#..... ....# \  #.#....... ...#..  ....######
+#      ##         ############\###.#..... ....#    #. ...#... ...#.\  ....#..* #
+#       #  #      #..\...#..***#\\.#..... ....#\   #......... ...#.. #....#.#\\#
+#      \\#\\**..  #..*...#..\\\########.. ..###*#\##.....*... .....*\#\\.....*.#
+#     ########..  #..#...#...**#......... .........#.***.* .......*\****.....#.#
+#       \         #.\.\..\.*.*\#......... ....***..#.\\\.. ................   .#
+#                 ####**.\\....\..\\\\\ # ####.....\.#####    .######    ##### #
+#                 #\.....#######........*R..\\\   .#....\\.................... #
+#                 #\..* .#     ##########\##########....****...#.##.....\\\\..\#
+#                 ########                         #....\\\\...#.........*....\#
+#                     ...................          \....\\\\...#.\\.    #\###.\# 
+#                                        \         \....     ..#.... ...#\\\\. # 
+#                                                  #........ ..#.... ...#..... # 
+#                                                  #........         ........#\# 
+################################################################################ 
+
+Water 5
diff --git a/maps/lightning/lightning14.map b/maps/lightning/lightning14.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning14.map
@@ -0,0 +1,100 @@
+########################L###########################################################################
+#\.\\**\**.\*\..*#.*.#\\**.\...\#\\\\.#\.......*\\..\.\#.\*\\.\\**\\\#\\*\\*\#.#*\#\.\\.*#\*#\...*\#
+#\*.\.\#.#.\\.*#\*..*\\\\\\\\#\...#.\\*\.\#.*.\#\...*#.#**.*\\.**\\\.\***#\#.\\\**#.#\.\\.\*\..\.*.#
+#\\.#..*\..\.*\.\\.\..\\.*\\\*.*##.\.\...\#\\*\.\\*\.##\**.\.**...#*.##..\.#\\\\.**\.\...\*..#.*.\\#
+#.#*#\*\#\\*#.#\\*#\*\.*...\...*\.\.**\*\\.***\\.\\#*\*#.*\*#\\.#....*#\.###\.\.\..\.\\\#.....\\\###
+#*#*\\#.*#*\\..\\#\.*.*#\.##.\*#.\..\#\\*\\\\.\.\\.\\.**\*.\\.**\##**..\.\#\...#\\..*.\.\*.\\*#.\*\#
+#*.\*\.\.\***.#..\\*#.\.\.#\\*\.\#\\\.\.\*.*.####\\\.*\.*...\\*..*.\\\#\..#.#.*..\\*.\\.**\.\#\*...#
+#...\...\*..\\\\\....\\*\\.\.*\.*#.\\*.\..\\#.\.#\....\\\*\\\\...\\..#.\.\#.**#\\#\.*..*.\#\\.*\..*#
+#.\.\\..*.\*.\.*#*\\##\..\\..#\\##...\\\.*\.*\#**#\*...\\#\..\\*..\\\..\\#\#*..\#....\**..\\\#**.*\#
+#***\*..*#\##.\\#\.\.**\....#\\\.\\\\\#\..\.*\*.#.#*#.\\\\.\\\.*\.\..\#\\.*\*\..*.*#\.\*\*.\.#.##*##
+#\\\..*#\\\*.\.##\**\..\.#..*\#**#..\..\.\***\*..#**.\.#..\.#*\\*#.\..\..**.#*\**\\\.\.#\*\*\\\\.#.#
+#..\\\\.#\###*#*\\.\\##*\#.\\...*.#.#\.\#*.\..*#\#\\\..\.*.\\.\..#..\.\\\...**\\\\.*..#.\.*\\\*.\\*#
+#..##.\*.*..\#\\..*\#**\#.\**\.\\\*\#....##\#\\\..\.#\*\#....\\\....###.\\\.\*#*#.#*..\*\\\\#.\.\###
+#..\\....#\#\.*\\\.\..\.\.\\...\.*#.#\\*#\#\...\*..##\\\.\\\\\....\\.*\\**..*..\\..#\.\.#\\#\\\.#.\#
+#..*##\#.##\\\\*\.*.*\\\\\\**\#\\*\\\#\*.\\.\.\.**\.#**.\.#\\\.*\\.\.\\\\*.\.\.\..***\.##.*.*\\\.\.#
+###\....\\#.\\\..\*\\*\\\\\\.\.##\...\\.\\\\.*.\\\\*...***\...\**...\.#......\*\##..\\\.\\*\.\##.\.#
+#\**\##\*\\.\\.\.\\*\\#*\.\\\#\*..*\....**.\#\.\\#\\\.\*#*#**\\**..#\#\...\.*#\\#\\\\.#\#*.#*#\.\.\#
+#.*.\\\\.#\\#*.*..\\\.\..\.\\*...**.\.*.*.\\.\*\\\.#**\#\\\\\\#\..\*..\\.*.\*..\\#.\*\.\\\.\**...\\#
+#.#.\##\\..\*.\\..*\**.\.##..\\#.\.\\...*#.\\..**\\...*#..\\\#\...\\*.\#\\\.*\*.\#\\\.#.\.*.*#*.\\\#
+#\\\#*.*\\\.#.*\\\***...\\**\\*.#\#.\\#**.*\.**\\....#\.\\*..*.*...#\\\\##\\*#\..#.\*#..\\.\\#**.**#
+#.*.#*\#.\.#\\*\\\\\\.*#..\#*.#\..\\\.\\.*#.*##\\.###*\\#\#.*.\.\\.*\...\.\\\\#....\.*#\#*#*\.\\#*.#
+#.\\.\*#\\**\#\\**\..\*..\\\\..#.###\*\..#**\..\\**\.\..\#\\.\\***\#\*\\\#\*...#\.*.#......**\*..*\#
+#.#.\\\\.*##\.\#.*#..##\.\..\.#\.\\\\...\\#*\.#..\\\\.*....*.*..\\\\\..#...*..\.\.\.#.\\.\.\.*.\\#*#
+#####\\\\..#*\.\\.\*...*.\\\\.....#..#\*#.\.#\.\\\....\\\.\.\\\..\\\.\#..**#\*\#*\.\*..#*\.\*..\..\#
+##..\...\..\#.\..\\\.*.*..\.##.\#\#.\*\.*.\##\\.\**.\#.\\\*#\*#*\\###*#\**\\#..\\\\...#\....*.*...\#
+#\.\\\.#*..\\.#**.....\*..*\#*\\\\...\\\.\..#..\.\.#\\*##\...##.\***.\#.\\\\.\#*...\##.\\.**.\..\#*#
+##\*\\..*\..\.\#\..#*.*##*#\#\\*..\.\.\#.#\#.\#.\\#*\\\.#\\#\.\\*\.\*.\.#\.\.*.*.\\.#\#\...\\..#\\\#
+#\\*\\*\*\.\#.\#..\..\*\.\*\\#..\...*\*.*.#.\.##\\#.\\\.*\\......\\*#.\*\...\*\*...#\#\...*##*\...\#
+##*#*\\\*...\*.\\\\.\\.\*#\#.\\..\\\.\\**.*\\.\\\\.\.#.**.#\\##\\....*\\\\##\.\.\.\\\\##\#...*..#\\#
+#.\#*\\*.*\\\..#*\.#.\..\..#*#\*\.*\*.\#\.\\.\\.#.##\*#**..\#\*.\#\*.*\\\.\\\.\.#\..**\\*\#\..##\.##
+#*\\..\##.*\\.\\\*\.\#\\\##.\\\\\#*\.*\\.*\#.#\.#.\*#.\...\.\#\.\\#\\**\#*\.**\\*##\..\.#.****\\#\##
+##..**\**...#\#.*#*..\\\\*\\\\**.\**\\.\#\\.#..\.\\#*.\\\.\##*\#..\*..\\**\\..*\\.\*#.*##.*.\.#.*..#
+#.*\.#\..#.#.#\#\\*#\**\.*..\....\.#**\\.\*##\##.\.\.\#....*\*.\#\\\\\*#\\..#*.**..\.*\*.*.\\*\\.\.#
+#\\#\.\*.##..\.\##*\\\\\*.\#**\\..##.\\*..*.#*#\***#\#.#\.#.\#....\\.\..\*\#\##\*.\\\\\.\#\#\..\.###
+#\.\\\\\#\R\#.\#\\.\\\##.\*\.#.\\\#*.*.\\#\.*\..\*.\\\\\#\.\#*\\..**..\\*\*.\###\..*###..***\\.\\\.#
+#\#.\*\.\\.\#\.\\#\*\\*#\\.\*\\*\..#.*.*..#.#.\**\\#.**\..\\*\#.\\\\..##\\*#..**..*\\.*.*..\\#*.#*##
+##.*.**\#*...*\.*#.*.\\\*.*.\*\*\.#.\..#*#.#\\\\...\\\\\#\\#.\..*#.\\.\\.\**\\...#.\#.\.\*.*..\\\*.#
+##*.\..#\.\\\##..*.##\\.\..\\\\\\.**\..*..*\\.#\#*..\*\...\\\*...\#.#*.*\\*\.#\\..*\\\*\.\\..#.**.\#
+####\\\\\*...\##*\\#...\.\#.\*#*\.#\*.#.....\..\.\\..\\.*.#\.#\\..\*\#\###\#.\\.\#.##..\\*\\\.#..\##
+##*\.\\..\#\\\\**\\\#\.#.\##\\\.#.#.#\\.\*\#\..\.\.\..\.\*##\\\\#\.\#\..\\.\\\.#\\\#...\\\\\..**.*\#
+#.*#*.*\*\.*\\**.\.\\..\...\\\.*\\.#\*#.**..\\\.**..\#\\.\\.\.*\**\...\.#.\..**\\.*\\###\.#..*.\\.\#
+#*\\##.\.\\#.\#.\\\...#\\#\\.\##\\\*#...\....\*#.\...*\\.*#*\#\#\*#.#.\...#*.\*\*.*..\\#\\\\\*.\*.\#
+#\\\*\*\*.\\##\.\.\#.\#.\#..#.\\\\..\.#.\*\\\\.\....##.\*.\..\*\\\*\\*\.\#\*\\\*.\.*.\\\\.\\.*.\**\#
+#\##*.\##\\\*\.\.#.\*.\\..\..*\...\.\###.\..*.#\#\..\*\*.\...\\.\#*\\**\*\*\\\*.\\.\#*\#.#\###\.**##
+#\\.\*.\.\..*#....*#.*\...\\..\.#.*.#\\.\\*#\.*..*\*.\.\.#..\\#........*.*\#\*#\#\\.#\\.*\**\..\*\\#
+#.\\\.**#\*..\\\##..\\\#\*.\\#.#\\\#\.##.\.#.#\.*\\*.\*\.\..\.\\\\#.\*#\**\*..\\.#\.\\.#.*\**..\.\*#
+##*#.....#\.\.*.\\##\*#..\\\...\*\.#.\.\.#\*.*......\\#\#\*\.#\\\\\#.##\.#*\.\\*..\\\.*\\\#\.\\.\\.#
+#...*\\\.\#*\\.#..*#.\#.\..\\\**.\\.#.\.\.\\...*\*..\.\#.\\\\\.*\\..#..\.#*.*\\\\\\#\##*\#.\\#\\\\.#
+#.\\\.\.\\*.*...\\*..\##*\#.*\\#\\\\.##.*\*\#..\\\#.\.\..\#\\#.\..*.\\..\\.#...\\.\#\\\*.*\#*\..*.\#
+#\\.\\....*.\\.\\\#\.\\\\\\#\.\...\**..*#*\.\.\\.\..\\.\\\#\\.\#\\#\\.\\\#.#.\*.\\\\*....\..\.\#\..#
+#*#\.\\\.....\..\.#\\\.\.#\\#.#\#*..*\\\\\.***\\.\.\#....#.\*.\\..*\\.\\\.*\\.\#..\..*\\..\..\\***\#
+#\\\...\.*\\\\\.#\.#.*..\*.#...#\*..\**\\*\.*#.....\.\.\\\#\\.*.\.\..*\..#\*.*\#.*\.\\\**\..#...#\.#
+##..\..##\\#\#\\\\*\*\\.\.\#\..\..*.#.#*\#\\.#\#*.\\#\.\\*\\#*.\\\\\\\\*\\..\.\..**\\#*.\#\\.##.\..#
+#\\\.\.*\.#\\\#\**..\..#\\.\*.\..\\.\\....#.*\.\...##..\.#\..\\.\\..\*\\\\#*\...*.*\..#.*\.\#\\.#\*#
+#\#*\.*\\*#*##..\.*.\\#.\..\\\\\.#.\##*\**\\**#\\.\##.\\#.##\.\.\#\\#.#\*..##...#\\\\.*\\\*\*.\..*.#
+#\.*#\\.\\...\.*\\##*\###\*......\.\#\.*#.#\.#*\.\.\\..*.\#\#\..#**#.\..*\\\\\\.*\\#*..\\\\\.\....\#
+#**.\*#.\.#*\*#..*\*.#.\**#\\..\\#\#\\\.#..\...\**\*\*\#.\\.\*#\\\\\*#.\*....#\.\\...##.\\\*\\.\\.##
+#\.\.\\.##\\.\#*\\\.#\\.*#\.\*\.#\\#\\.\.#..#\\*\..*\#\..##.##\\##..#*\#\*\.\\\\*\\\#..\#\\*.\\\.\\#
+#*#\.##.*\.\\..\.*#\\**.*..#.\.#\\\.#.\.\\\**#..\*.\\.#.\\#*\*.\\\\\***.\\\\.\*.\\.\.*\*.*.\\.\*\\\#
+#\#.#...\.#...\\\*.\#...**.\*.\...#*###\.\..#.\\\*..\.\\\\\#\.\#\#\\.\\*#**\\.\###.*.*...\\*\..#\\*#
+#\..*#..#.#\\\.\.\\#.\#.\..*\#\.#.....*.\#.\\\\.#\\\\#\\#.\#.#\\#..#\\.\#..\.*.\.\.\\\\.*..*#..#\\\#
+#.\*..\\*\#\...#.##\\\\..\#\\\**#\\.*...\\###\\\..\\.\.\*\\.\#\.\.#\##.\\.#\*#\\##\\.**.\\\\.\#\\\.#
+#**.*\#.#\..\.\\.*...\#*###*\\\\\.*\\\.\#\#\#\\\..\.\\\#\.*#\\\\.\\.#.#.\...\###\.*\.\\\\*.\\.\\\#*#
+##.\.\#\\**#\#\\.\\.\.\.#.\*....\....*\\\.\\#\##.*#\\#....\*\..\.\.\...\.*.\\*.\##\\###..\.\#\.*#..#
+#\.\.*.\#...*#.\#\..\*#\*#..**#\.\\\.\.*\*.\*.##\.*\\\\\#\\*#\\\\#\\.\*.\\....#.\....\\#\\#..\\.\*##
+#\....\\\.\\*.*#..#\#*#\\#\.\\\\.*\##\*.\#*###\*\**.\#\.\\\\\\*#\*.###.*.\\.#\........\....\*\...\##
+#\\##.\#\\.#\*.\.\#.\##.\\\\.\#\\.\##.\#..*.\.##*\..\#\#.\\\.#\.\\\*\*\*\#\\.\*#.**\\.\\\\*.#**\..\#
+##\*#\*\\*\.#*\#.\#..\..\#*.*\#\\.\\.\.#\..\.*\\*\\\#.\.\*.#.\#.\..\.\.*.#\\**.*#**#\\***\.\.\\.#.\#
+#\#\*#\.\\.\\..\\\#\..\\*..\.\*\*\*\#\\.***.#\.*\##\#..\#\\##\\.#.\##*\**\#\..\\*..\\\*.#..*.\\*#\\#
+#\\*.#.#*\\\*#\.#\\.\\..#\*\#\*\*.\.\#\##\\#\\.\#*..\\\...*\\\\#.*\\\#.\.\\\#...\\.*\\..\*.#\\\\\###
+##..#.\\\\##*\.#.*...\\\\\#*.#.....#\#\.*\#.#.*.\\\..#*.\#.\\\.#\#.\\#\.*\\###\\\\*\*..#.#\\\.##*.\#
+#\..\\*#\\..#\\\#.#\#.**\.#\\.....*#.#\\\\\.#..\..###.#\.\#..\#\\*#*\.\\*...*\\\\.#..\..\..\\*\\.\\#
+#\\*.\..*\*\##...\\\..#\.\\.\\*\.#.\\\..\.\..*\#..#\\\#\\\..\\.\*.###.\*\#\\\\\\\.\..#\\..\.\.\\\**#
+#*.#..\*.*#...\\\\.\.####\\\\\\.\#**.*.\.#.#.*.\.\\#\*.\*#\\\..#.*.#.#*\...\..\*..##.....\\..\\*\\\#
+#.\#\#..\\#\.\\.\\*.*\\..#\\*\.\##..\\*.\\*.#\\.#.#.#..*\..#..*\\\\\#\*..\.\#\\.*.#\\\...\\\\..\*\.#
+#\###*.\.\.\\.#\#....\..#..\\\.#\\#\*#\\\..*\.*#.\#.\#\\\#\**..#.\\*.*##..#\*\..\#\*.\*.\\\..\.#\#\#
+#*\\**#\\\\.*.#..\\.\..\*.\*#*.#\..\\#**..**.***##..\\#.#*#...*\.##**.**.\*\.\.#.\*\*##.....*\.#\\*#
+#.\\#*\.*\\*##\#.....\.#\*\*.#*#\#.\\\*\.*..#\\**\.\..#.\.#\\\\#*\..*\..\.\#*\\**.\*##*..\\#\*\#.\.#
+#\###*.\#...\\\#\\#**.\\.\\...*\*\\.\#*.\#\\.*###*.\\\.\\.*.*\\*\.#.\\\\..#..\..\#..\.*\.*.\\..#\#.#
+#.\\\*#\#*\\.\#*#*\##\.\.#*#\\\\\\\.\\#*..\\\\\..\\*.\#.#.#.*..#**#\\.\*.\\.\\..**.\\*..\*.\.\..#\\#
+##*..\\\*\\\#*#\.#.\.\\.\\#.\.#\.\*.#\\....\\#.\#.\..*\\\*#\\\.#.\*\#*#.*\##.\#**#.**\\..*.#.#\.\..#
+#...\\*\..*.##\\\*##*\..#\*.*.\\*.\*#*\#*...\..\.#.*.\\.#\..\\.\\#\*\...#\.\\\.\.\\*.#\*\#..\*.\**##
+#*..\\*####..*#.\\.#*.*\.\.*\.#..\\\\.*...\..\*.\\\.\\*.*\\\*\*#\*\.\\#*...\.\\\..##.*.##.\*.\#\.*\#
+#\\#.\.*#.#\.\#\\.*.\##\.\.\#.#.*.\.*.#\\##.\\##\*#...*.\\\\#\...\\\\*#\#\\.#**.\#*.#\*...\.\\\.\..#
+#\\\.\\*#\..\\*.\#\*..\*..\\.\\\....\\.\.\#*\..\*.\.\\\\\\\#*\.\#\**\\##*........#\..\.*.\\#..*.\..#
+#*..\##\.\\#\**#\*.\...#.....\.\\.\\\\.\.\\..\*.*\.#*\*\*.##*\.\*.*\\\\\\.\\#\..*\\..\#.#....\\#*\.#
+####\\\.\#\.\\.##*.\#\#\**....#*..\\.*.\...#.#\\\...\#**\#\\\\#\.#\..#\.\..\.\\.#*.*.....#.\*...\\\#
+#.\.\\*.\\..#.\\*\.\\.#\\\#..\\*##**.\#\##**.\\\#.**\.\.#\.\#.#\#\.\*.\\*\.\*\\.#..\\\..#.\..\*.#.\#
+#.\#\\.\\*\\\\**.\\*\\..##*\#\\#\\*##\*..*#\....\..\**\**\*\\*.#\\*...#\#.\\\\\\\.#.*\\#\\\#\#\\\\\#
+#\..\#\\.\\\..\..\#\.\\.*.\#*..\\.\\#\#.\*\\\*\\\*#\*\..*\....*\...\...\#.#*.\*#*\\*.*\..\*..\.\#\\#
+#.\\*\\\#\..\..*#..\.\#\\\#\**\#\**\.#\\\.*#\\..\..\\\\#\#\\.*\.....\\\...*\\\\#\..#...#.\##..*\\..#
+#\..#*.\\#\#.\*\..\.\\\.\**..\\.#*\\\.\\\\..#..\*\#\.\\\.#\\*\\\.\**##\#*\#.\*\\.\\...#\\.\\\\.\##\#
+#.....\*\.*\.*.#.*..*\#\#.*#\\.#...\..\\.\***\#\#\\.*.#\\.*\#*\#.\\#..\###.\*\\\\.#\#*##\#*.**\#.\\#
+#**\\.#\\\\.*.\\*.*#\*\.#\*\\\#\*..\\\.#\#*\*.\###*\#\.*\#\..\#.\.\\.\\\.\\\\.*\.#.\\..#\*.\#.#\\.##
+#.\\.**#\.#\*\\\\\*\\\*.\.\*\*\...\\\\*\*.\.\\\\#.\.#\*..\\.#\*#\.*..\*..\\\\*.\\\#\.*.\\\\\.*..\..#
+#*.\.#.\#\\.\\#\\*..\*\\.\*\##\\*\\...#*###\.\#\\.#\#\\*\\..\\#*\\#\\\\..\\..*.*#*\.\.\\\\#\.##\.\##
+#\\\\\*\.\\*\\\\\*\\\\\\.\#.###.\.\\\*#\\\.*.\#\\\\\#*.#..*\\\..\\.\\*\\##.\\\.\.\..\\\....\\..*..\#
+##\\##.\\\*#*.\.\.#\.\*.\*.\\\.*\*\..\..#.**\*\\*.\**\.*#\...\.#\\\\\\\#.\.#\.\\\.#\.#.##*#.\\.\**\#
+##....#.\\*\\\.\\\\\.#.\\*.#**\\\\#.#\\#\\#...#\*.*#*..\\#*#\\\*\*\\\\.#\.#...*\*.\\#\\\..\\\.*\*.\#
+####################################################################################################
diff --git a/maps/lightning/lightning2.map b/maps/lightning/lightning2.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning2.map
@@ -0,0 +1,9 @@
+########
+#..R...#
+#..*...#
+#..#...#
+#.\.\..L
+####**.#
+#\.....#
+#\..* .#
+########
diff --git a/maps/lightning/lightning3.map b/maps/lightning/lightning3.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning3.map
@@ -0,0 +1,15 @@
+###############
+#\\\.......** #
+#\\#.#####...##
+#\\#.....*##. #
+#\#####\...## #
+#\......####* #
+#\.######* #.\#
+#\.#. *...##.##
+#\##. ..  *...#
+#\...... L#.#.#
+###########.#.#
+#\..........#.#
+##.##########.#
+#R.#\.........#
+###############
diff --git a/maps/lightning/lightning4.map b/maps/lightning/lightning4.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning4.map
@@ -0,0 +1,23 @@
+########################
+#.....................\#
+#......*\   ...........#
+#......*... ......* ...#
+#..   \\... .*..... ...#
+#.. ....... ....... ...#
+#.. ....... .\\.... ...#   ######
+#.  ....      .....\...#   #\\\\#
+#\\\......... .........#   #....#
+###########     R      ########*#####
+          #.......... ........***\\\#
+          #.......... ............**#
+          #.......... ......... *.*\#
+          #....\\.... ....\\..... ..L
+          #.....................****#
+          #........\*...............#
+          #...........     .........#
+          #.........................#
+          ###########################
+
+Water 1
+Flooding 20
+Waterproof 10
diff --git a/maps/lightning/lightning5.map b/maps/lightning/lightning5.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning5.map
@@ -0,0 +1,25 @@
+######################
+#..R#.........\\\\\..#
+#...#..#...#..#####..#
+#...#..#...#....#\...#
+#...####\#*#....#....#
+#...\\\#.............#
+#.#################..#
+#.........\\\... *...#
+#...\........... #...#
+#...\..***..#... ....#
+#...\.......#..# *..\#
+#...\\\\\...#..#\#..\#
+#...........##......\#
+#.#..........######..#
+#.#..#########.......#
+L.#....#.....#.......#
+#####..#...\\#.......#
+#....**#.##*########.#
+#......#.#.....#.....#
+#\\\\\...#...........#
+######################
+
+Water 0
+Flooding 25
+Waterproof 10
diff --git a/maps/lightning/lightning6.map b/maps/lightning/lightning6.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning6.map
@@ -0,0 +1,17 @@
+#######     #######
+#..**.#     #..*\*#
+#.R*\\#######.****#
+# \\    ..... \*\*#
+#  \\\\\  ...\\\*\#
+#..........\...\.\#
+######..**. #######
+     #.##\..#
+     #.#.##.#
+     # \\...#
+###### .#.**#######
+#      ...\\\\\\\.#
+# ................#
+#..**........*.*.\#
+#\\#. #######\#\.\#
+#\\#\ #     # ... #
+#######     #L#####
diff --git a/maps/lightning/lightning7.map b/maps/lightning/lightning7.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning7.map
@@ -0,0 +1,17 @@
+     ######
+     #....#############
+     #.**.. .. ..** \\#
+     #.**..  .  ..\ \\#
+     #.**..  .    .   #
+######.\\......#****###
+#**....*.......# .. #
+#\\...\L\\\....#    #
+#\......\*\**..# .\\#
+######R.....###########
+     ###.**. * ....\\\#
+       #\\\\#..\\\.\\\#
+       #\\\\#......\\\#
+       ################
+
+Water 2
+Flooding 20
diff --git a/maps/lightning/lightning8.map b/maps/lightning/lightning8.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning8.map
@@ -0,0 +1,17 @@
+##############################
+#R.............#\............#
+#..\######################\..#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#............................#
+#..*****.*\...*...*...*****..#
+#..*\....*\....*\*..*.\\*\\..#
+#..*\....****..\*\......*....#
+#..*\....*\....*\*..*...*....#
+#..*\....*\...*...*.....*....#
+#............................#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#................ ..... .....#
+#................      #....L#
+##############################
+
+Flooding 30
diff --git a/maps/lightning/lightning9.map b/maps/lightning/lightning9.map
new file mode 100644
--- /dev/null
+++ b/maps/lightning/lightning9.map
@@ -0,0 +1,20 @@
+####################
+#    #         \..\#
+#\#\  \#....#   ####
+#.#  # .....#   \\ #
+#.#  #  ....#  *   #
+#.#  #R     #  \.  #
+#.#  #****. # ..\  #
+#.#  #*****\# ..#  #
+#\#  #\....\#  \#  #
+#\   #..#..\#      #
+#\#### ########### #
+#... #   #  ..\\\\ #
+# .. #   #  \###.. #
+# ...... #         #
+# ###### #   ***** #
+# ...... #**.\\\.. #
+# \  #.. #\\...... #
+# .. #   #     \\\ #
+#    \\\\#L *...   #
+####################
diff --git a/maps/rocks.map b/maps/rocks.map
new file mode 100644
--- /dev/null
+++ b/maps/rocks.map
@@ -0,0 +1,38 @@
+#######
+#*****#
+#****@#
+#***@!#
+#***W\#
+#* *!\#
+#* *  #
+#* *  #
+#* *  #
+#  *  #
+#* *  #
+#  *  #
+#* *  #
+#  *  #
+#  *  #
+#  *  #
+#     #
+#  R  #
+#     #
+# # # #
+# #W# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+# #\# #
+###L###
+
+Growth 67
+Water 1
+Flooding 6
+Waterproof 12
+
diff --git a/maps/secondtimearound.map b/maps/secondtimearound.map
new file mode 100644
--- /dev/null
+++ b/maps/secondtimearound.map
@@ -0,0 +1,38 @@
+                                                  
+                   ###                                
+                   #@###                          
+                  ##@W.##                         
+                 ## .R. ##                        
+                ##  #.#  ##                       
+               ##  ## ##  ##                      
+              ##  ##   ##  ##                     
+             ##  ##     ##  ##                    
+            ##  ##       ##  ##                   
+           ##  ##         ##  ##                  
+          ##  ##           ##  ##                 
+         ##  ##             ##  ##                
+        ##  ##               ##  ##               
+       ##  ##                 ##  ##              
+      ##  ##                   ##!!##             
+     ##\ ##                     ##!\##            
+    ##\\##           L           ##\\##           
+     ##\ ##                     ##!\##            
+      ##  ##                   ##*!##             
+       ##  ##                 ## .##              
+        ##  ##               ##   #               
+         ##\\##\\           ##  ###               
+          ##\\##\          ##  ##                 
+           ##\\##         ##  ##                  
+            ##\\##       ##  ##                   
+             ##  ##     ##  ##                    
+              ##  #######  ##                     
+               ##  #@#@#  ##                      
+                ##  @#*  ##                       
+                 ##\\\\\##                        
+                  ##\W\##                         
+               ######\######                      
+               #\\\\\\\\\\\#
+               #############
+
+Growth 3
+Razors 0
diff --git a/maps/sixty-four-moves.map b/maps/sixty-four-moves.map
new file mode 100644
--- /dev/null
+++ b/maps/sixty-four-moves.map
@@ -0,0 +1,100 @@
+################
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#**************#
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#************* #
+#************. #
+#*******.***** #
+#......\\..... #
+#.......\..... #
+#......\\..... #
+#......\...... #
+#............. #
+#............. #
+#....\\\\..... #
+#...\.....\... #
+#...\......... #
+#...\......... #
+#............. #
+#.....\....... #
+#.....\....... #
+#.....\....... #
+#......\\\.... #
+#............. #
+#............. #
+#............. #
+#............. #
+#............. #
+#.............R#
+##############L#
diff --git a/maps/smash.map b/maps/smash.map
new file mode 100644
--- /dev/null
+++ b/maps/smash.map
@@ -0,0 +1,6 @@
+#####
+# R\L
+#* *#
+#* *#
+#* *#
+#####
diff --git a/maps/superposition.map b/maps/superposition.map
new file mode 100644
--- /dev/null
+++ b/maps/superposition.map
@@ -0,0 +1,20 @@
+                
+ ###### 
+##** \# 
+#R.. \# 
+###  \# 
+  #  A# 
+  #  \# 
+  #  \# 
+  #  \# 
+  # 1*##
+  #  .\#
+  #* *##
+  ## ###
+   # #  
+   # ###
+   #  L#
+#### ###
+########
+
+Trampoline A targets 1
diff --git a/maps/test0.map b/maps/test0.map
new file mode 100644
--- /dev/null
+++ b/maps/test0.map
@@ -0,0 +1,15 @@
+###############
+#***...R......#
+#***... ...*..#
+#\\\... ..\\\.#
+#...... ...*..#
+#..     .. ...#
+#.... .... ...#
+#.... .... ...#
+#.. .       ..#
+#..*. .. .....#
+#.... .. .....#
+#.\.. .......*#
+#.............#
+#.........   .#
+#############L#
diff --git a/maps/test1.map b/maps/test1.map
new file mode 100644
--- /dev/null
+++ b/maps/test1.map
@@ -0,0 +1,18 @@
+###############
+#***...R......#
+#***... ...*..#
+#\\\!.. ..\\\.#
+#...... ...*..#
+#..     .. ...#
+#.... .... ...#
+#.... .... ...#
+#.. .   !   ..#
+#..*. .. . ...#
+#.... .. . ...#
+#.\.. .... ..*#
+#......... . .#
+#!....... W   #
+#############L#
+
+Growth 25
+Razors 0
diff --git a/maps/test10.map b/maps/test10.map
new file mode 100644
--- /dev/null
+++ b/maps/test10.map
@@ -0,0 +1,10 @@
+############
+#..@.R..*..#
+#..A....B..######
+#....2.. ..#\\\C#
+#......* *.#\\\1#
+########L########
+
+Trampoline A targets 1
+Trampoline B targets 1
+Trampoline C targets 2
diff --git a/maps/test2.map b/maps/test2.map
new file mode 100644
--- /dev/null
+++ b/maps/test2.map
@@ -0,0 +1,19 @@
+########################
+#.....................\#
+#......     ...........#
+#.......... ......@ ...#
+#.....\\... ....... ...#
+#.......... ....... ...#
+#.......... .\\.... ...#   ######
+#.......      .....%...#   #\\\\#
+#\........... .........#   #....#
+###########     R      ########*#####
+          #.......... ........***\\\#
+          #.......... ............**#
+          #.......... ......... *.*\#
+          #....\\.... ....\\..... ..L
+          #.....................****#
+          #........\*...............#
+          #...........     .........#
+          #.........................#
+          ###########################
diff --git a/maps/test3.map b/maps/test3.map
new file mode 100644
--- /dev/null
+++ b/maps/test3.map
@@ -0,0 +1,29 @@
+#######################################
+#****................#..1...\\\\\\\B..#
+#R.......##############################
+#.. ..................................#
+#.. ........       %            ......#
+#.. .@. .... ......#....... ..........#
+#.. ... ...........#.A..... ..........#
+#.. ... ...........#.......    *  \\..#
+#.. ... ...........#....... ..........#
+#.. ... ...........#....... ..........#
+#.. ... ...........#................**#
+#..\\\\\...........#................\\#
+########### ############## ############
+#...*.................................#
+#....*..................        ......#
+#... .*....*.............. ..... .....#
+#....*2*........########.. ..... .....L
+#...*...*.......#\\\#..... ...*.......#
+#.....\\\.......#\\\#....**..***......#
+#....    .......#\\\#*................#
+#...............#\\\#*...**...*.......#
+#...............#.....................#
+######       ############## ### #######
+#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
+#######################################
+
+Trampoline A targets 1
+Trampoline B targets 2
+
diff --git a/maps/test4.map b/maps/test4.map
new file mode 100644
--- /dev/null
+++ b/maps/test4.map
@@ -0,0 +1,9 @@
+########
+#..R...#
+#..*...#
+#..#...#
+#.\.\..L
+####**.#
+#\.....#
+#\..* .#
+########
diff --git a/maps/test5.map b/maps/test5.map
new file mode 100644
--- /dev/null
+++ b/maps/test5.map
@@ -0,0 +1,16 @@
+     ######
+     #....#
+     #.**.#
+     #.**.#
+     #.**.#
+######.\\.######
+#**....*.......#
+#\\....L\\\....#
+#A......*****..#
+######R.....###########
+     ###.....*.....\\\#
+       #\\\\#..1...\\\#
+       #\\\\#......\\\#
+       ################
+
+Trampoline A targets 1
diff --git a/maps/test6.map b/maps/test6.map
new file mode 100644
--- /dev/null
+++ b/maps/test6.map
@@ -0,0 +1,14 @@
+     ######
+     #....#
+     #.**.#
+     #.**.#
+     #.**.#
+######.\\.######
+#**....*.......#
+#\\....L\\\....#
+#.......*****..#
+######R.....####
+     ###....#
+       #\\\\#
+       #\\\\#
+       ######
diff --git a/maps/test7.map b/maps/test7.map
new file mode 100644
--- /dev/null
+++ b/maps/test7.map
@@ -0,0 +1,19 @@
+##############################
+#R...........................#
+#.........................W..#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#............................#
+#..*****.*\...*...*...*****..#
+#..*\....*\....*\*..*.\\*\\..#
+#..*\....****..!*!......*....#
+#..*\....*\....*\*..*...*....#
+#..*\....*\...*...*.....*....#
+#............................#
+#..\\\\\\\\\\\\\\\\\\\\\\\\..#
+#................ ..... .....#
+#................      W....L#
+##############################
+
+Growth 25
+Razors 10
+Flooding 20
diff --git a/maps/test8.map b/maps/test8.map
new file mode 100644
--- /dev/null
+++ b/maps/test8.map
@@ -0,0 +1,12 @@
+###########
+#....R....#
+#.*******.#
+#.\\\\\\\.#
+#.       .#
+#..*\\\*..#
+#.#*\\\*#.#
+#########L#
+
+Water 0
+Flooding 10
+Waterproof 5
diff --git a/maps/test9.map b/maps/test9.map
new file mode 100644
--- /dev/null
+++ b/maps/test9.map
@@ -0,0 +1,16 @@
+        ################
+        #*****#!!  1   #
+        #..\..#        #
+#########\\\\ # .\\\.  #
+#.............# *      #
+#.. .\\\#..!..#\**     #
+#.. LW\\#W  ..##### ####
+#..R\\\\#.. ..*\*\*W...#
+#.......A.. ...\.\...\\#
+#..........     **     #
+############....\.######
+           #.....!#
+           ########
+
+Growth 15
+Trampoline A targets 1
diff --git a/maps/trampoline1.map b/maps/trampoline1.map
new file mode 100644
--- /dev/null
+++ b/maps/trampoline1.map
@@ -0,0 +1,10 @@
+############
+#..*.R..*..#
+#..A....B..######
+#....2.. ..#\\\C#
+#......* *.#\\\1#
+########L########
+
+Trampoline A targets 1
+Trampoline B targets 1
+Trampoline C targets 2
diff --git a/maps/trampoline2.map b/maps/trampoline2.map
new file mode 100644
--- /dev/null
+++ b/maps/trampoline2.map
@@ -0,0 +1,18 @@
+     ######
+     #....#############
+     #.**.. .. ..*@ \\#
+     #.**..  .  ... \\#
+     #.**..  .    . 3 #
+######.\\......#****###
+#**....*.......#    #
+#\\...BL\\\....#    #
+#A......*****..# 2\C#
+######R.....###########
+     ###.....*.....\\\#
+       #\\\\#..1...\\\#
+       #\\\\#......\\\#
+       ################
+
+Trampoline A targets 1
+Trampoline B targets 2
+Trampoline C targets 3
diff --git a/maps/trampoline3.map b/maps/trampoline3.map
new file mode 100644
--- /dev/null
+++ b/maps/trampoline3.map
@@ -0,0 +1,29 @@
+#######################################
+#****................#..1...\\\\\\\B..#
+#R.......##############################
+#.. ..................................#
+#.. ........       \            ......#
+#.. .*. ....**.*...#....... ..........#
+#.. ... ....\\\\...#.A..... ..........#
+#.. ... ....\ .....#.......    *  \\..#
+#.. ... ....\......#....... ..........#
+#.. ... ....\......#....... ..........#
+#.. ... ...........#................**#
+#..\\\\\...........#................\\#
+########### ############## ############
+#...*.................................#
+#....*..................        ......#
+#... .*....*.............. ..... .....#
+#....*2*........########.. ..... .....L
+#...*...*.......#\\\#..... ...*.......#
+#.....\\\.......#\\\#....**..***......#
+#....    .......#\\\#*................#
+#...............#\\\#*...**...*.......#
+#...............#.....................#
+######       ############## ### #######
+#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
+#######################################
+
+Trampoline A targets 1
+Trampoline B targets 2
+
diff --git a/maps/trampoline4.map b/maps/trampoline4.map
new file mode 100644
--- /dev/null
+++ b/maps/trampoline4.map
@@ -0,0 +1,16 @@
+     ######
+     #....#
+     #.**.#
+     #.**.#
+     #.**.#
+######.\\.######
+#**....*.......#
+#\\....L\\\....#
+#A......*****..#
+######R.....###########
+     ###.....*.....\\\#
+       #\\\\#..1...\\\#
+       #\\\\#......\\\#
+       ################
+
+Trampoline A targets 1
diff --git a/maps/wetbeard.map b/maps/wetbeard.map
new file mode 100644
--- /dev/null
+++ b/maps/wetbeard.map
@@ -0,0 +1,25 @@
+#########################################
+#RWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWW\WWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#@WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#
+#######################################L#
+
+Water    0
+Flooding 10
+Waterproof 5
+Growth   25
+Razors  33
diff --git a/maps/zigzag.map b/maps/zigzag.map
new file mode 100644
--- /dev/null
+++ b/maps/zigzag.map
@@ -0,0 +1,14 @@
+###################################################################################################
+#L     \\\\\\\\\\\\   \\\   \\\\\\\\\\\\\ \\\\\ \\\\\\\\\\\\\\\\\\\\   \\\  \\\\\ \\\\\\\\\\\\\\\ #
+#####  ############   ###                 ##### #####21#############        ##### ############### #
+#####                ##W##  ############# ##W## ###########ABW######   ###   #W#  ############### #
+#R     \\\\\\\\\\\\  \\\\\  \\\\\\\\\\\\\ \\\\\ \\\\\\\\\\\\\\\\\\\\   \\\   \\\  \\\\\\\\\\\\\\\ #
+###################################################################################################
+
+Water 0
+Flooding 60
+Waterproof 9
+Growth 3
+Razors 0
+Trampoline A targets 1
+Trampoline B targets 2
diff --git a/src/Main.hs b/src/Main.hs
new file mode 100644
--- /dev/null
+++ b/src/Main.hs
@@ -0,0 +1,226 @@
+module Main where
+
+import Map
+import Rules
+
+import Paths_lifter
+
+import Graphics.Gloss
+import Graphics.Gloss.Interface.IO.Game
+import Graphics.Gloss.Interface.IO.Simulate
+import System.FilePath
+import System.Directory
+import Data.Array.IO
+import System.Environment
+import Debug.Trace
+import Control.Monad
+
+import Foreign.Marshal.Array hiding (newArray)
+import Foreign.Storable
+import qualified Data.ByteString as B
+import Codec.Image.STB 
+import Data.Bitmap.Simple
+
+data Opts = Opts { mapFile :: FilePath,
+                   route :: Maybe FilePath,
+                   displayRun :: Bool,
+                   tracing :: Bool,
+                   showEnd :: Bool,
+                   displaySpeed :: Int,
+                   mscale :: Float }
+
+main = do ddir <- getDataDir
+          args <- getArgs
+          opts <- processArgs ddir args 
+                        (Opts (error "No map file") Nothing False False False 10 2)
+          imgs <- mkImgData
+          initSt' <- loadMap imgs (mapFile opts) (tracing opts)
+          let initSt = initSt' { iscale = mscale opts }
+          ((wl,hl), (wh,hh)) <- getBounds (world initSt)
+          let max = ((wh - wl) + 1)  * ((hh - hl) + 1)
+          case route opts of
+            Nothing ->
+              playIO (InWindow "Lambda Lifter" (800, 600) (10, 10)) (greyN 0.2)
+                     30 -- set FPS
+                     initSt
+                     drawWorld
+                     handleInput
+                     stepWorld
+            Just r ->
+              do rinfo <- readFile r 
+                 if (displayRun opts)
+                    then
+                      simulateIO 
+                            (InWindow "Lambda Lifter" (800, 600) (10, 10)) (greyN 0.2)
+                            (displaySpeed opts) 
+                            (initSt, take max rinfo)
+                            (\ (s, _) -> drawWorld s)
+                            stepSimulate
+                    else
+                      do endSt <- validate initSt (take max rinfo)
+                         putStrLn $ "Score: " ++ show (score endSt)
+                         when (won endSt) $ putStrLn "Mining complete"
+                         when (dead endSt) $ putStrLn "Robot squashed"
+                         when (showEnd opts) $ do m <- printMap (world endSt) (waterlevel endSt)
+                                                  putStrLn m
+    where
+      processArgs d [] o = return o
+      processArgs d ("--route":r:rest) o
+                         = processArgs d rest (o { route = Just r })
+      processArgs d ("--display":rest) o
+                         = processArgs d rest (o { displayRun = True })
+      processArgs d ("--txt":rest) o
+                         = processArgs d rest (o { showEnd = True })
+      processArgs d ("--speed":n:rest) o
+                         = processArgs d rest (o { displaySpeed = read n })
+      processArgs d ("--scale":n:rest) o
+                         = processArgs d rest (o { mscale = read n })
+      processArgs d ("--trace":rest) o
+                         = processArgs d rest (o { tracing = True })
+      processArgs d (m:rest) o
+         = do ok <- doesFileExist m
+              if ok then processArgs d rest (o { mapFile = m } )
+                    else processArgs d rest (o { mapFile = (d ++ "/maps/" ++ m) } )
+                               
+
+blackPixel = [15,6,2,255]
+brownPixel = [139,69,19,255]
+
+lineA, lineB :: [Word8]
+lineA = concat (take 8 (repeat (blackPixel ++ brownPixel)))
+lineB = concat (take 8 (repeat (brownPixel ++ blackPixel)))
+
+dirtData :: [Word8]
+dirtData = concat (take 8 (repeat (lineA ++ lineB)))
+
+dirtBMP = bitmapOfByteString 16 16 (B.pack dirtData) True
+
+getBMPdata :: Bitmap Word8 -> IO Picture 
+getBMPdata img = withBitmap img $
+   \ (w, h) nchans pad ptr ->
+      do -- read the raw data
+         idata <- word8s (w * h * nchans) ptr []
+         -- rgba is reversed, so fix it
+         let idata' = swapOrder idata
+         -- upside down, so fix it...
+         let idata'' = invert (w * nchans) idata'
+         return (bmp idata'')
+  where word8s 0 ptr acc = return (reverse acc)
+        word8s n ptr acc = do i <- peek ptr
+                              let ptr' = advancePtr ptr 1
+                              word8s (n - 1) ptr' (i : acc)
+        bmp bdata = bitmapOfByteString 16 16 (B.pack bdata) True
+
+        swapOrder (a:b:g:r:rest) = r:g:b:a: (swapOrder rest)
+        swapOrder xs = xs
+
+        invert w dat = concat $ reverse (splitAt w dat)
+        splitAt n xs | n < length xs = take n xs : splitAt n (drop n xs) 
+                     | otherwise = [xs]
+
+loadPic :: String -> IO Picture
+loadPic p = do ddir <- getDataDir
+               imgIn <- loadImage (ddir ++ "/graphics/" ++ p ++ ".bmp")
+               case imgIn of
+                    Left err ->fail err
+                    Right img -> getBMPdata img
+mkImgData = do brickBMP <- loadPic "bricks"
+               lambdaBMP <- loadPic "lambda"
+               rockBMP <- loadPic "rock"
+               lamrockBMP <- loadPic "lamrock"
+               playerBMP <- loadPic "miner"
+               bugBMP <- loadPic "bug"
+               liftBMP <- loadPic "lift"
+               razorBMP <- loadPic "razor"
+               beardBMP <- loadPic "beard"
+               trampolineBMP <- loadPic "goto"
+               targetBMP <- loadPic "target"
+               openliftBMP <- loadPic "openlift"
+               return (Imgs brickBMP dirtBMP lambdaBMP rockBMP lamrockBMP 
+                                     playerBMP bugBMP
+                                     liftBMP openliftBMP razorBMP beardBMP trampolineBMP
+                                     targetBMP)
+
+handleInput (EventKey (SpecialKey KeyUp) Down ms fs) s = return $ s { ymove = 1,
+                                                                      xmove = 0 }
+handleInput (EventKey (SpecialKey KeyUp) Up   ms fs) s = return $ s { ymove = 0 }
+handleInput (EventKey (SpecialKey KeyDown) Down ms fs) s = return $ s { ymove = -1,
+                                                                        xmove = 0 }
+handleInput (EventKey (SpecialKey KeyDown) Up   ms fs) s = return $ s { ymove = 0 }
+handleInput (EventKey (SpecialKey KeyLeft) Down ms fs) s = return $ s { xmove = -1,
+                                                                        ymove = 0 }
+handleInput (EventKey (SpecialKey KeyLeft) Up   ms fs) s = return $ s { xmove = 0 }
+handleInput (EventKey (SpecialKey KeyRight) Down ms fs) s = return $ s { xmove = 1,
+                                                                         ymove = 0 }
+handleInput (EventKey (SpecialKey KeyRight) Up   ms fs) s = return $ s { xmove = 0 }
+handleInput (EventKey (SpecialKey KeySpace) Up ms fs) s   = return $ s { shave = True }
+handleInput (EventKey (Char 'w') Up ms fs) s              = return $ s { pause = True }
+handleInput _ s = return $ s
+
+drawWorld st = do ts <- getAssocs (world st)
+                  let water = waterlevel st
+                  let (x, y) = playerpos st
+                      (ex, ey) = exitpos st
+                      p = player (bitmaps st) 
+                  return $ Pictures [
+                            Scale (iscale st) (iscale st) $ 
+                            Pictures (p : -- centre on player
+                                      toPic st water x y (((ex, ey), mkExit) : 
+                                          (filter (nearPos (iscale st) (x,y)) ts))),
+                            winPic (won st),
+                            losePic (dead st),
+                            scorePic (score st)]
+  where mkExit | lambdas st == 0 = ExitOpen
+               | otherwise = Exit
+        exitOpen st = False
+        nearPos s (x, y) ((x', y'), _) = fromIntegral (abs (x - x')) < (40 / s) && 
+                                         fromIntegral (abs (y - y')) < (40 / s)
+
+winPic False = Pictures []
+winPic True = Translate (-250) 0 $ Color yellow $ Text "You win!"
+
+losePic False = Pictures []
+losePic True = Translate (-220) 0 $ Color (light red) $ Text "Ouch!!"
+
+scorePic i = Translate (-380) 260 $ Scale 0.2 0.2 $
+              Color white $ Text ("Score: " ++ show i)
+
+data ImgData = Imgs { bricks :: Picture,
+                      dirt :: Picture,
+                      lambda :: Picture,
+                      rock :: Picture,
+                      lamrock :: Picture,
+                      player :: Picture,
+                      bug :: Picture,
+                      closedlift :: Picture,
+                      openlift :: Picture,
+                      razor :: Picture,
+                      beard :: Picture,
+                      trampoline :: Picture,
+                      target :: Picture 
+                    }
+
+toPic :: GameState ImgData -> Int -> Int -> Int -> [((Int, Int), Tile)] -> [Picture]
+toPic st water xoff yoff world = map pic world
+   where pic ((x, y), t) = Translate (toEnum ((x-xoff) * 16)) 
+                                     (toEnum ((y-yoff) * 16)) $
+                                if (y < water)
+                                   then Pictures [Color (makeColor8 0 0 255 128)
+                                          (Polygon [(-8,-8),(8,-8),(8,8),(-8,8)]), showPic t]
+                                   else showPic t
+         showPic Wall = bricks (bitmaps st)
+         showPic Dirt = dirt (bitmaps st)
+         showPic (Bug _ _) = bug (bitmaps st)
+         showPic Rock = rock (bitmaps st)
+         showPic Lambda = lambda (bitmaps st)
+         showPic LamRock = lamrock (bitmaps st)
+         showPic Exit = closedlift (bitmaps st)
+         showPic ExitOpen = openlift (bitmaps st)
+         showPic Razor = razor (bitmaps st)
+         showPic (Beard _) = beard (bitmaps st)
+         showPic (Trampoline _) = trampoline (bitmaps st)
+         showPic Target = target (bitmaps st)
+         showPic _ = Pictures []
+
+
+
diff --git a/src/Map.hs b/src/Map.hs
new file mode 100644
--- /dev/null
+++ b/src/Map.hs
@@ -0,0 +1,169 @@
+module Map where
+
+import Rules
+
+import Data.Array.IO
+import Control.Monad.State
+
+import Data.Array.IO
+import System.IO
+
+import Debug.Trace
+
+mkWorld :: Int -> Int -> [[Tile]] -> IO (IOArray (Int, Int) Tile)
+mkWorld width height ts 
+     = do arr <- newArray ((0,0), (width-1, height-1)) Empty
+          setArr arr 0 (reverse ts)
+          return arr
+    where setArr arr h (l : ls) = do setLine arr h 0 l
+                                     setArr arr  (h+1) ls
+          setArr arr h [] = return ()
+          setLine arr h c (x : xs) = do writeArray arr (h,c) x
+                                        setLine arr h (c + 1) xs
+          setLine arr h c [] = return ()
+
+
+parseMeta s l 
+   = case words l of
+        ["Growth", r] -> s { growthrate = read r }
+        ["Razors", r] -> s { razors = read r }
+        ["Water", r] ->  s { waterlevel = read r }
+        ["Waterproof", r] ->  s { waterproofing = read r }
+        ["Flooding", r] -> s { floodstep = read r, floodrate = read r }
+        ["Trampoline", [x], "targets", [y]] 
+                      -> s { trampPath = updateMap y x (trampPath s) }
+        _ -> s
+
+updateMap x y [] = []
+updateMap x y ((k, v) : xs) | x == k = (x, v) : (y, v) : updateMap x y xs
+                            | otherwise = (k, v) : updateMap x y xs
+
+loadMap :: a -> FilePath -> Bool -> IO (GameState a)
+loadMap extra f tr 
+          = do fdata <- readFile f
+               let (tiles, metadata) = span (not.null) $ lines fdata
+               let (w, h) = (maximum (map length tiles), length tiles)
+               world <- newArray ((0,0), (w-1, h-1)) Empty
+               oldworld <- newArray ((0,0), (w-1, h-1)) Empty
+               let initSt = GS extra 
+                            (0,0) (0, 0) 0 0 0 0 0 0 growth [] [] False False False False 
+                            tr world 0 0 0 0 10 oldworld 0 2
+               let mSt = foldl parseMeta initSt metadata
+               mSt' <- execStateT (buildWorld w h tiles) mSt
+               -- HACK! Do it again to update trampoline metadata
+               return $ foldl parseMeta mSt' metadata
+
+buildWorld :: Int -> Int -> [[Char]] -> StateT (GameState a) IO ()
+buildWorld w h ts = setArr 0 (reverse (take h ts))
+    where setArr h (l : ls) = do setLine h 0 (take w l)
+                                 setArr (h + 1) ls
+          setArr h [] = return ()
+          setLine h c (x : xs) = do st <- get
+                                    st' <- lift $ setAt st h c x
+                                    put st'
+                                    setLine h (c + 1) xs
+          setLine h c [] = return ()
+
+          setAt st h c '#' = do writeArray (world st) (c,h) Wall
+                                return st
+          setAt st h c 'R' = do writeArray (world st) (c,h) Player
+                                return (st { playerpos = (c,h) })
+          setAt st h c 'L' = do writeArray (world st) (c,h) Exit
+                                return (st { exitpos = (c,h) })
+          setAt st h c '.' = do writeArray (world st) (c,h) Dirt
+                                return st
+          setAt st h c '%' = do writeArray (world st) (c,h) (Bug UP RIGHT)
+                                return st
+          setAt st h c '*' = do writeArray (world st) (c,h) Rock
+                                return st
+          setAt st h c '@' = do writeArray (world st) (c,h) LamRock
+                                return (st { lambdas = 1 + lambdas st,
+                                             totalLams = 1 + totalLams st })
+          setAt st h c '!' = do writeArray (world st) (c,h) Razor
+                                return st
+          setAt st h c 'W' = do writeArray (world st) (c,h) (Beard (growthrate st - 1))
+                                return st
+          setAt st h c '\\' = do writeArray (world st) (c,h) Lambda
+                                 return (st { lambdas = 1 + lambdas st,
+                                              totalLams = 1 + totalLams st })
+          setAt st h c t 
+              | t `elem` ['A'..'I']
+                = do writeArray (world st) (c,h) (Trampoline t)
+                     return $ st { trampLocs = (t, (c, h)) : trampLocs st }
+              | t `elem` ['1'..'9']
+                = do writeArray (world st) (c,h) Target
+                     return $ st { trampPath = (t, (c, h)) : trampPath st }
+          setAt st h c _ = do writeArray (world st) (c,h) Empty
+                              return st
+
+testWorld = let top = take 32 (repeat Wall)
+                side = Wall : take 30 (repeat Empty) ++ Wall : [] in
+             mkWorld 32 32 $ top : take 30 (repeat side) ++ top : []
+
+stepWorld t s | mkTrace s
+              = if (xmove s /= 0 || ymove s /= 0 || shave s || pause s)
+                    then 
+                      do printTrace s
+                         hFlush stdout
+                         s <- movePlayer s
+                         s <- moveBugs s
+                         s <- applyRules s
+                         return $ s { timeSinceUpdate = 0, 
+                                      xmove = 0, ymove = 0,
+                                      shave = False, pause = False }
+                    else return s
+stepWorld t s = let time = t + timeSinceUpdate s in
+                    if time > 0.1 && not (dead s) then
+                      do s <- movePlayer s
+                         s <- moveBugs s
+                         s <- applyRules s
+                         return $ s { timeSinceUpdate = 0}
+                      else return $ s { timeSinceUpdate = time }               
+
+stepSimulate v t (s_in, ('A':cs)) = stepSimulate v t (s_in, []) -- abort
+stepSimulate v t (s_in, (c : cs))
+  | not (dead s_in)
+    = do let s = mkMove s_in c 
+         s <- movePlayer s
+         s <- moveBugs s
+         s <- applyRules s
+         return (s, cs)
+stepSimulate v t (s, []) 
+  | not (dead s)
+    = do s <- moveBugs s
+         s <- applyRules s
+         return (s, [])
+stepSimulate v t s = return s
+
+validate s_in ('A' : cs) = validate s_in [] -- abort
+validate s_in (c : cs)
+  | not (dead s_in) && c `elem` "UDLRWS"
+    = do let s = mkMove s_in c
+         s <- movePlayer s
+         s <- moveBugs s
+         s <- applyRules s
+         validate s cs
+  | otherwise = validate s_in cs
+validate s _ 
+    = do return s
+
+mkMove :: GameState a -> Char -> GameState a
+mkMove s 'U' = s { ymove = 1, xmove = 0, shave = False }
+mkMove s 'D' = s { ymove = -1, xmove = 0, shave = False }
+mkMove s 'L' = s { ymove = 0, xmove = -1, shave = False }
+mkMove s 'R' = s { ymove = 0, xmove = 1, shave = False }
+mkMove s 'W' = s { ymove = 0, xmove = 0, shave = False }
+mkMove s 'S' = s { ymove = 0, xmove = 0, shave = True }
+mkMove s _ = s
+
+printTrace :: GameState a -> IO ()
+printTrace s 
+    | xmove s == 1 = putStr "R"
+    | xmove s == -1 = putStr "L"
+    | ymove s == 1 = putStr "U"
+    | ymove s == -1 = putStr "D"
+    | shave s = putStr "S"
+    | pause s = putStr "W"
+printTrace _ = return ()
+
+
diff --git a/src/Rules.hs b/src/Rules.hs
new file mode 100644
--- /dev/null
+++ b/src/Rules.hs
@@ -0,0 +1,361 @@
+module Rules where
+
+import Data.Array.IO
+import Control.Monad
+
+data Direction = UP | RIGHT | DOWN | LEFT
+  deriving (Show, Eq, Enum)
+
+next LEFT = UP
+next d = succ d
+
+prev UP = LEFT
+prev d = pred d
+
+data Tile = Empty
+          | Rock
+          | LamRock
+          | Lambda
+          | Bug Direction Direction
+          | Dirt
+          | Wall
+          | Exit
+          | ExitOpen
+          | Beard Int
+          | Razor
+          | Trampoline Char
+          | Target
+          | Player
+  deriving (Show, Eq)
+
+toChar :: Tile -> Char
+toChar Empty = ' '
+toChar Rock = '*'
+toChar LamRock = '@'
+toChar (Bug _ _) = '%'
+toChar Dirt = '.'
+toChar Wall = '#'
+toChar Lambda = '\\'
+toChar Exit = 'L'
+toChar ExitOpen = 'O'
+toChar (Beard _) = 'W'
+toChar Razor = '!'
+toChar (Trampoline c) = 'T'
+toChar Target = 't'
+toChar Player = 'R'
+
+data Metadata = Growth Int | Razors Int
+  deriving (Show, Eq)
+
+type GameMap = IOArray (Int, Int) Tile
+
+data GameState a = 
+                 GS { bitmaps :: a,
+                      playerpos :: (Int, Int),
+                      exitpos :: (Int, Int),
+                      lambdas :: Int,
+                      totalLams :: Int,
+                      xmove :: Int,
+                      ymove :: Int,
+                      score :: Int,
+                      razors :: Int,
+                      growthrate :: Int,
+                      trampPath :: [(Char, (Int, Int))],
+                      trampLocs :: [(Char, (Int, Int))],
+                      shave :: Bool,
+                      pause :: Bool,
+                      won :: Bool,
+                      dead :: Bool,
+                      mkTrace ::Bool,
+                      world :: GameMap, 
+                      waterlevel :: Int,
+                      floodrate :: Int,
+                      floodstep :: Int,
+                      glug :: Int,
+                      waterproofing :: Int,
+                      oldworld :: GameMap,
+                      timeSinceUpdate :: Float,
+                      iscale :: Float
+                    }
+
+printMap :: GameMap -> Int -> IO String 
+printMap m w = do ((wl, hl), (wh, hh)) <- getBounds m
+                  strs <- mapM (\row -> 
+                                  do mapM (\col -> 
+                                              do x <- readArray m (col, row)
+                                                 return (toChar x)) [wl..wh]) [hh,hh-1..hl]
+                  return (unlines strs)
+
+growth :: Int
+growth = 25 -- steps between beard growth
+
+{- rules for tile movement:
+
+* A player can make one of the following moves:
+  - Up, Down, Left, Right, Wait
+    (in gameplay, 'Wait' is implied by doing nothing for one game step, say
+     1/20th of a second)
+* A player may move to any of the following:
+  - Empty, Dirt
+  - Lambda (increasing score by 1)
+  - Exit (but only if there are no lambdas)
+  - Rock (but only if the rock can be pushed sideways into an Empty space)
+* When a player moves, the square he moves to becomes Player and the square he
+  vacates becomes Empty
+
+After player movement the following rules are applied, in order, to update the
+map. We apply the rules to points on the map left to right, then bottom to top:
+
+* A rock will move DOWN if there is an Empty space below it
+* A rock will move DOWN and RIGHT if there is a Rock below it and an Empty 
+  right, and below and right
+* A rock will move DOWN and RIGHT if there is a Lambda below it and an Empty 
+  right, and below and right
+* A rock will move DOWN and LEFT if there is a Rock below it and an Empty 
+  left, and below and left
+
+The game ends in any of the following conditions:
+
+* There is a rock directly above the player [Squashed: lose]
+* There are no lambdas left and the player is at the exit (the lambda lift) [win]
+
+-}
+
+surrounding s (x, y) = do ((wl, hl), (wh, hh)) <- getBounds (world s)
+                          return [(x', y') | x' <- [x-1 .. x+1],
+                                             y' <- [y-1 .. y+1],
+                                             (x', y') /= (x, y),
+                                             (x' >= wl && x' <= wh &&
+                                              y' >= hl && y' <=hh)]
+
+applyRules :: GameState a -> IO (GameState a)
+applyRules s | won s = return s
+applyRules s = do ((wl, hl), (wh, hh)) <- getBounds (world s)
+                  -- read the contents of the world before update, so that we don't
+                  -- run into problems when updating tiles that will get updated again
+                  -- later.
+                  mapM_ (\p -> do x <- readArray (world s) p
+                                  writeArray (oldworld s) p x) 
+                                    [(x,y) |  y <- [hl..hh], x <- [wl..wh] ]
+                  squashTest <- mapM update [(x,y) |  y <- [hl..hh], x <- [wl..wh]]
+                  let squashedLocs = concat squashTest
+                  -- better check it's still a rock and not overwritten by a beard!
+                  squashed <- mapM (\p -> do c <- readArray (world s) p 
+                                             return (c `elem` [Rock, LamRock, Lambda])) 
+                                                    squashedLocs
+                  let (_, y) = playerpos s
+                  let glug' = if y < waterlevel s then glug s + 1 else 0
+                  let dead' = or squashed || dead s || glug' > waterproofing s
+                  let sc = if dead'
+                              then score s - (totalLams s - lambdas s) * 25
+                              else score s
+                  let fr = floodrate s
+                  let (w, fs) = if fr == 0 then (waterlevel s, floodstep s)
+                                   else 
+                                      if (floodstep s - 1 == 0)
+                                         then (waterlevel s + 1, floodrate s)
+                                         else (waterlevel s, floodstep s - 1)
+                  return s { dead = dead',
+                             glug = glug',
+                             score = sc,
+                             waterlevel = w, floodstep = fs }
+    where update (x, y) = do t <- readArray (oldworld s) (x, y)
+                             case t of
+                               Rock ->
+                                 do below <- readArray (oldworld s) (x, y-1)
+                                    rt <- readArray (oldworld s) (x+1, y)
+                                    belowrt <- readArray (oldworld s) (x+1, y-1)
+                                    lt <- readArray (oldworld s) (x-1, y)
+                                    belowlt <- readArray (oldworld s) (x-1, y-1)
+                                    moveRock Rock (x, y) below rt belowrt lt belowlt
+                               LamRock ->
+                                 do below <- readArray (oldworld s) (x, y-1)
+                                    rt <- readArray (oldworld s) (x+1, y)
+                                    belowrt <- readArray (oldworld s) (x+1, y-1)
+                                    lt <- readArray (oldworld s) (x-1, y)
+                                    belowlt <- readArray (oldworld s) (x-1, y-1)
+                                    moveRock LamRock (x, y) below rt belowrt lt belowlt
+                               Beard 0 -> do writeArray (world s) (x, y) 
+                                                        (Beard (growthrate s - 1))
+                                             growBeard (x, y)
+                                             return []
+                               Beard n -> do writeArray (world s) (x, y) (Beard (n - 1))
+                                             return []
+                               _ -> return []
+
+          growBeard (x, y) = do adj <- surrounding s (x, y)
+                                -- any surrounding which are Empty get a Beard growth
+                                mapM (\ (x', y') ->
+                                         do t <- readArray (oldworld s) (x', y')
+                                            when (t == Empty) $
+                                               writeArray (world s) (x', y') 
+                                                         (Beard (growthrate s - 1)))
+                                     adj
+                               
+          moveRock r (x, y) Empty _ _ _ _ 
+                                  = do writeArray (world s) (x, y) Empty
+                                       writeArray (world s) (x, y-1) r
+                                       s <- checkSquashed (x, y-2)
+                                       when (r == LamRock) $
+                                          checkTransform (x, y-2) (x, y-1)
+                                       if s then return [(x, y-1)] else return []
+          moveRock r (x, y) rck Empty Empty _ _
+                     | rck `elem` [Rock, LamRock]
+                                  = do writeArray (world s) (x, y) Empty
+                                       writeArray (world s) (x+1, y-1) r
+                                       s <- checkSquashed (x+1, y-2)
+                                       when (r == LamRock) $
+                                          checkTransform (x+1, y-2) (x+1, y-1)
+                                       if s then return [(x+1, y-1)] else return []
+          moveRock r (x, y) Lambda Empty Empty _ _
+                                  = do writeArray (world s) (x, y) Empty
+                                       writeArray (world s) (x+1, y-1) r
+                                       s <- checkSquashed (x+1, y-2)
+                                       when (r == LamRock) $
+                                          checkTransform (x+1, y-2) (x+1, y-1)
+                                       if s then return [(x+1, y-1)] else return []
+          moveRock r (x, y) rck _ _ Empty Empty
+                     | rck `elem` [Rock, LamRock]
+                                  = do writeArray (world s) (x, y) Empty
+                                       writeArray (world s) (x-1, y-1) r
+                                       s <- checkSquashed (x-1, y-2)
+                                       when (r == LamRock) $
+                                          checkTransform (x-1, y-2) (x-1, y-1)
+                                       if s then return [(x-1, y-1)] else return []
+          moveRock _ _ _ _ _ _ _ = return []
+
+          checkSquashed p = do t <- readArray (oldworld s) p
+                               case t of
+                                  Bug _ _ -> do writeArray (world s) p Empty
+                                                return False
+                                  Player -> return True
+                                  _ -> return False
+          checkTransform p p' 
+               = do t <- readArray (oldworld s) p
+                    when (t /= Empty) $ writeArray (world s) p' Lambda
+
+moveBugs :: GameState a -> IO (GameState a)
+moveBugs s = do ((wl, hl), (wh, hh)) <- getBounds (world s)
+                -- read the contents of the world before update, so that we don't
+                -- run into problems when updating tiles that will get updated again
+                -- later.
+                mapM_ (\p -> do x <- readArray (world s) p
+                                writeArray (oldworld s) p x) 
+                                    [(x,y) | x <- [wl..wh], y <- [hl..hh]]
+                eaten <- mapM update [(x,y) | x <- [wl..wh], y <- [hl..hh]]
+                return s { dead = or eaten }
+    where update (x, y) = do t <- readArray (oldworld s) (x, y)
+                             case t of
+                               Bug d d' -> do (x', y') <- moveBug (x, y) d d'
+                                              return ((x', y') == playerpos s)
+                               _ -> return False
+          moveBug (x, y) d d'
+              = do let (x', y') = getNext (x, y) d' -- trying to go this way
+                   let (x'', y'') = getNext (x, y) d -- default this way
+                   newtile <- readArray (oldworld s) (x', y')
+                   newtile' <- readArray (oldworld s) (x'', y'')
+                   case newtile of
+                       Empty -> do writeArray (world s) (x, y) Empty
+                                   writeArray (world s) (x', y') (Bug (next d) (next d'))
+                                   return (x', y')
+                       Player -> do writeArray (world s) (x, y) Empty
+                                    writeArray (world s) (x', y') (Bug (next d) (next d'))
+                                    return (x', y')
+                       _ -> case newtile' of
+                                 Empty -> do writeArray (world s) (x, y) Empty
+                                             writeArray (world s) (x'', y'')
+                                                        (Bug d d')
+                                             return (x'', y'')
+                                 Player -> do writeArray (world s) (x, y) Empty
+                                              writeArray (world s) (x'', y'')
+                                                        (Bug d d')
+                                              return (x'', y'')
+                                 _ -> do writeArray (world s) (x, y) (Bug (prev d) (prev d'))
+                                         return (x, y)
+
+          getNext (x, y) d = case d of
+                                     UP -> (x, y + 1)
+                                     DOWN -> (x, y - 1)
+                                     LEFT -> (x - 1, y)
+                                     RIGHT -> (x + 1, y)
+
+
+
+movePlayer :: GameState a -> IO (GameState a)
+movePlayer s | won s = return s
+movePlayer s | dead s = return s 
+movePlayer s | shave s 
+             = -- any beard in squares adjacent to the player become Empty
+               do let (x, y) = playerpos s
+                  r <- if (razors s > 0)
+                          then do adj <- surrounding s (x, y)
+                                  mapM_ shaveBeard adj
+                                  return (razors s - 1)
+                          else return $ razors s
+                  return $ s { shave = False, razors = r, score = score s - 1 }
+    where shaveBeard (x, y) = do t <- readArray (world s) (x, y)
+                                 case t of
+                                    Beard _ -> writeArray (world s) (x, y) Empty
+                                    _ -> return ()
+movePlayer s = do let (x, y) = playerpos s
+                  let (x', y') = (x + xmove s, y + ymove s)
+                  tile <- readArray (world s) (x', y')
+                  -- Can only move onto Empty, Dirt, ExitOpen, Lambda, Razor, Trampoline
+                  -- Can move to a rock, if the rock can move into the space in the same
+                  -- direction as the player movement
+                  execMove tile (x, y) (x', y') (s { score = score s - 1 })
+
+execMove (Trampoline t) (x, y) (x', y') s
+         = case lookup t (trampPath s) of
+                Just (xt, yt) ->
+                    do writeArray (world s) (xt, yt) Player
+                       writeArray (world s) (x', y') Empty -- Eliminate the trampoline
+                       -- Eliminate others to same target
+                       mapM_ (\p -> writeArray (world s) p Empty)
+                             (trampsTo (xt, yt) (trampLocs s) (trampPath s)) 
+                       writeArray (world s) (x, y) Empty
+                       return $ s { playerpos = (xt, yt) }
+                _ -> return s
+    where trampsTo p [] _ = []
+          trampsTo p ((c, t):cs) xs 
+                               = case lookup c xs of
+                                      Just p' -> if p == p' then t : trampsTo p cs xs
+                                                            else trampsTo p cs xs
+                                      _ -> trampsTo p cs xs
+execMove tile (x, y) (x', y') s
+    | tile `elem` [Empty, Dirt, ExitOpen, Lambda, Razor] 
+         = do writeArray (world s) (x', y') Player
+              writeArray (world s) (x, y) Empty
+              let lams = case tile of
+                              Lambda -> lambdas s - 1
+                              _ -> lambdas s
+              let raz = case tile of
+                              Razor -> razors s + 1
+                              _ -> razors s
+              let sc = case tile of
+                            Lambda -> score s + 50
+                            ExitOpen -> if (not (won s)) then score s + totalLams s * 25
+                                                         else score s
+                            _ -> score s
+              when (lams == 0) $
+                      writeArray (world s) (exitpos s) ExitOpen
+              return $ s { playerpos = (x', y'),
+                           lambdas = lams,
+                           razors = raz,
+                           score = sc,
+                           won = won s || (x', y') == exitpos s }
+     | isBug tile
+           = do writeArray (world s) (x, y) Empty
+                return $ s { dead = True }
+     | (tile == Rock || tile == LamRock) && ymove s == 0
+          = do tile' <- readArray (world s) (x' + xmove s, y' + ymove s)
+               if tile' == Empty then 
+                  do writeArray (world s) (x, y) Empty
+                     writeArray (world s) (x', y') Player
+                     writeArray (world s) (x' + xmove s, y' + ymove s) tile
+                     return $ s { playerpos = (x', y') }
+                  else return s
+    where isBug (Bug _ _) = True
+          isBug _ = False
+execMove tile (x, y) (x', y') s = return s
+
