js/index.js
//update the information on the table for the port
update the information on the table for the port
update the information on the table for the port
function listPort() {
  document.getElementById("port").innerHTML = "Now in " + portName[nowPort] + ".";
  document.getElementById("portTax").innerHTML = "Where import tarrifs are: "+ Math.round(portInfo[nowPort][0]*100) + "%.";
  for (var i = 1; i <= maxCom; i++){
    if (i < cargoList.length) {
      document.getElementById("Comd"+i).innerHTML = portInfo[nowPort][i]+"<br//><button type=\"button\" onclick=\"buyCargo("+i+")\">Buy</button>";
    } else {
      document.getElementById("Comd"+i).innerHTML = "";
    }
  }
}
function listPort ( ) { document . getElementById ( "port" ) . innerHTML = "Now in " + portName [ nowPort ] + "." ; document . getElementById ( "portTax" ) . innerHTML = "Where import tarrifs are: " + Math . round ( portInfo [ nowPort ] [ 0 ] * 100 ) + "%." ; for ( var i = 1 ; i <= maxCom ; i ++ ) { if ( i < cargoList . length ) { document . getElementById ( "Comd" + i ) . innerHTML = portInfo [ nowPort ] [ i ] + "<br//><button type=\"button\" onclick=\"buyCargo(" + i + ")\">Buy</button>" ; } else { document . getElementById ( "Comd" + i ) . innerHTML = "" ; } } }
update the information on the table for the port
update the information on the table for the port
//update table with prices