Make level convertor take arguments
authorNeil <neil@dip.sun.ac.za>
Sat, 5 Mar 2016 16:45:25 +0000 (18:45 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 5 Mar 2016 17:02:14 +0000 (19:02 +0200)
koperkapel/levels/l2 [deleted file]
koperkapel/levels/level_converter.py
koperkapel/levels/t2 [deleted file]

diff --git a/koperkapel/levels/l2 b/koperkapel/levels/l2
deleted file mode 100644 (file)
index d53575e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-wwwwwwwwww
-wffffffffw
-wsgffgfffw
-wffffffffw
-wwwwwwwwww
\ No newline at end of file
index 8949de6267c129ebf1f79a77469654be33fe57dd..f03bd3ebaa368ea8efddc369a4289310bfe9d460 100644 (file)
@@ -1,5 +1,6 @@
 import os
 import json
+import sys
 
 ATTRIBUTE_MAP = {
     ' ': {'floor': {'base': 'floor',
@@ -96,4 +97,8 @@ class level_generator:
 
 if __name__ == '__main__':
     l = level_generator()
-    l.convert('l2', 't2')
+    if len(sys.argv) != 3:
+        print("Usage %s <floor layer> <tunnel layer>" % sys.argv[0])
+        #l.convert('l2', 't2')
+    else:
+        l.convert(sys.argv[1], sys.argv[2])
diff --git a/koperkapel/levels/t2 b/koperkapel/levels/t2
deleted file mode 100644 (file)
index f401896..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-tttttttttt
-tttttttttt
-tt-----ttt
-tttttttttt
-tttttttttt
\ No newline at end of file