ints are ints

This commit is contained in:
ajuvercr 2020-03-21 16:33:17 +01:00
parent 422989bebc
commit addbe74222
2 changed files with 5 additions and 5 deletions

View file

@ -16,7 +16,7 @@
</div> </div>
<div class="input_container"> <div class="input_container">
<label for="currentShipCount">Ship count:</label> <label for="currentShipCount">Ship count:</label>
<input id="currentShipCount" type="number" value="20"></input> <input id="currentShipCount" type="number" value=20></input>
</div> </div>
<label>Hovered planet parameters</label> <label>Hovered planet parameters</label>

View file

@ -30,10 +30,10 @@
planets.push( planets.push(
{ {
"name": parameters[i][j]["name"], "name": parameters[i][j]["name"],
"ship_count": parameters[i][j]["shipCount"], "ship_count": parseInt(parameters[i][j]["shipCount"]),
"owner": parameters[i][j]["colour"], "owner": parameters[i][j]["colour"],
"x": j, "x": parseInt(j),
"y": i "y": parseInt(i)
} }
); );
} }
@ -56,7 +56,7 @@
} }
const handleConfirmButton = () => { const handleConfirmButton = () => {
fields["mapOutput"].style.display = "block"; fields["mapOutput"].classList.remove("hidden");
fields["mapOutput"].value = JSON.stringify(constructMap(),null,2); fields["mapOutput"].value = JSON.stringify(constructMap(),null,2);
console.log(constructMap()); console.log(constructMap());
} }