hacknet.js: fix typo, remove unecessary functions and lines.
[?]
Sep 10, 2020, 9:06 AM
HNZOVUVQPVZ77VAZHPF464CQONRZPTCGMLPWPV7M6JDE3PE42ZQACDependencies
- [2]
R7OI6M4Uoptimise for gain rate increase per cost to simplify computation by decreasing iterations done. - [3]
2BKHJI2Sinit - [4]
CTUEOIV2hacknet.js: take into account the gain rate increases of upgrades. - [5]
CEZ56FCMhacknet.js: make this run based on whether the ratio of upgrades are still within threshold instead of until Netburners requirements are met, to make it more flexible. main.js, README.md: include changes to accomodate "hacknet.js" updates.
Change contents
- edit in sbin/hacknet.js at line 46
const object_get_nodes_stats = function (ns) {const object_output = {level: 0,ram: 0,cores: 0,};const integer_nodes = ns.hacknet.numNodes();for (let integer_index_nodes = 0;integer_index_nodes < integer_nodes;++integer_index_nodes) {const object_node_stats = ns.hacknet.getNodeStats(integer_index_nodes);object_output.level += object_node_stats.level;object_output.ram += object_node_stats.ram;object_output.cores += object_node_stats.cores;}return object_output;}; - edit in sbin/hacknet.js at line 59
let object_nodes_stats = object_get_nodes_stats(ns); - edit in sbin/hacknet.js at line 64
object_nodes_stats = object_get_nodes_stats(ns); - replacement in sbin/hacknet.js at line 101
1,00,1