diff --git a/mapbuilder/index.html b/mapbuilder/index.html
index 796e9f1..9cb3d2b 100644
--- a/mapbuilder/index.html
+++ b/mapbuilder/index.html
@@ -16,7 +16,7 @@
-
+
diff --git a/mapbuilder/script.js b/mapbuilder/script.js
index 874534a..8adefe9 100644
--- a/mapbuilder/script.js
+++ b/mapbuilder/script.js
@@ -30,10 +30,10 @@
planets.push(
{
"name": parameters[i][j]["name"],
- "ship_count": parameters[i][j]["shipCount"],
+ "ship_count": parseInt(parameters[i][j]["shipCount"]),
"owner": parameters[i][j]["colour"],
- "x": j,
- "y": i
+ "x": parseInt(j),
+ "y": parseInt(i)
}
);
}
@@ -56,7 +56,7 @@
}
const handleConfirmButton = () => {
- fields["mapOutput"].style.display = "block";
+ fields["mapOutput"].classList.remove("hidden");
fields["mapOutput"].value = JSON.stringify(constructMap(),null,2);
console.log(constructMap());
}