diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..59590c9
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+cc_tools
\ No newline at end of file
diff --git a/.idea/cc_tools.iml b/.idea/cc_tools.iml
new file mode 100644
index 0000000..64bae8a
--- /dev/null
+++ b/.idea/cc_tools.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..88b37df
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..ed3a031
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..8b4370a
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,785 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Convert.py b/Convert.py
new file mode 100644
index 0000000..ee80482
--- /dev/null
+++ b/Convert.py
@@ -0,0 +1,5 @@
+import cc_dat_utils
+
+from_dat = cc_dat_utils.make_cc_data_from_dat("pfgd_test.dat")
+
+print(from_dat)
\ No newline at end of file
diff --git a/__pycache__/cc_dat_utils.cpython-35.pyc b/__pycache__/cc_dat_utils.cpython-35.pyc
new file mode 100644
index 0000000..1a06943
Binary files /dev/null and b/__pycache__/cc_dat_utils.cpython-35.pyc differ
diff --git a/__pycache__/cc_data.cpython-35.pyc b/__pycache__/cc_data.cpython-35.pyc
new file mode 100644
index 0000000..14cee44
Binary files /dev/null and b/__pycache__/cc_data.cpython-35.pyc differ
diff --git a/cc_json_utils.py b/cc_json_utils.py
new file mode 100644
index 0000000..a33e192
--- /dev/null
+++ b/cc_json_utils.py
@@ -0,0 +1,95 @@
+import cc_dat_utils
+import cc_data
+import sys
+import json
+
+def make_cc_data_from_json(json_data):
+ cc_data_object = cc_data.CCDataFile()
+ for json_level in json_data:
+ cc_level = cc_data.CCLevel()
+ cc_level.time = json_level["time"]
+ cc_level.level_number = json_level["level_number"]
+ cc_level.num_chips = json_level["chip_number"]
+ cc_level.upper_layer = json_level["upper_layer"]
+ cc_level.lower_layer = json_level["lower_layer"]
+
+ for json_field in json_level["optional_fields"]:
+ if json_field["type"] == 3:
+ field_title = json_field["title"]
+ cc_field = cc_data.CCMapTitleField(field_title)
+ elif json_field["type"] == 4:
+ json_traps = json_field["traps"]
+ cc_traps = []
+ cc_buttons = []
+ for json_trap in json_traps:
+ bx = json_trap[0]
+ by = json_trap[1]
+ tx = json_trap[2]
+ ty = json_trap[3]
+ button_coord = cc_data.CCCoordinate(bx, by)
+ trap_coord = cc_data.CCCoordinate(tx, ty)
+ cc_buttons.append(button_coord)
+ cc_traps.append(trap_coord)
+ cc_field = cc_data.CCTrapControlsField(cc_traps, cc_buttons)
+ elif json_field["type"] == 5:
+ json_machines = json_field["machines"]
+ cc_buttons = []
+ cc_machines = []
+ for json_machine in json_machines:
+ bx = json_machine[0]
+ by = json_machine[1]
+ tx = json_machine[2]
+ ty = json_machine[3]
+ button_coord = cc_data.CCCoordinate(bx, by)
+ machine_coord = cc_data.CCCoordinate(tx, ty)
+ cc_buttons.append(button_coord)
+ cc_machines.append(machine_coord)
+ cc_field = cc_data.CCCloningMachineControlsField(cc_buttons, cc_machines)
+ elif json_field["type"] == 6:
+ json_password = json_field["password"]
+ cc_passwords = []
+ for json_password in json_password:
+ w = json_password[0]
+ x = json_password[1]
+ y = json_password[2]
+ z = json_password[3]
+ cc_field = cc_data.CCEncodedPasswordField(w, x, y, z)
+ elif json_field["type"] == 7:
+ field_hint = json_field["hint"]
+ cc_field = cc_data.CCMapHintField(field_hint)
+ elif json_field["type"] == 10:
+ json_monsters = json_field["monsters"]
+ cc_monsters = []
+ for json_monster in json_monsters:
+ x = json_monster[0]
+ y = json_monster[1]
+ monster_coord = cc_data.CCCoordinate(x,y)
+ cc_monsters.append(monster_coord)
+ cc_field = cc_data.CCMonsterMovementField(cc_monsters)
+ cc_level.add_field(cc_field)
+ cc_data_object.add_level(cc_level)
+ return cc_data_object
+
+# Handling command line arguments
+# Note: sys.argv is a list of strings that contains each command line argument
+# The first element in the list is always the name of the python file being run
+# Command line format: