From addbe742226acb4285bf243414f34e51c62bc59d Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Sat, 21 Mar 2020 16:33:17 +0100 Subject: [PATCH] ints are ints --- mapbuilder/index.html | 2 +- mapbuilder/script.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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()); }