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 class="input_container">
<label for="currentShipCount">Ship count:</label>
<input id="currentShipCount" type="number" value="20"></input>
<input id="currentShipCount" type="number" value=20></input>
</div>
<label>Hovered planet parameters</label>

View file

@ -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());
}