add program

This commit is contained in:
Isaac Shoebottom 2023-11-03 21:53:18 -03:00
parent a3bdb2ccd1
commit 92ad2da7b7

View File

@ -1,10 +1,13 @@
import { recursiveScan } from "./utils" import { recursiveHackingRequired, recursiveScan } from "./utils"
export async function main(ns: NS){ export async function main(ns: NS){
switch (ns.args[0]) { switch (ns.args[0]) {
case "getServers": case "getServers":
getServers(ns); getServers(ns);
break; break;
case "getHackingLevels":
getHackingLevels(ns);
break;
default: default:
ns.tprint("Invalid program name"); ns.tprint("Invalid program name");
break; break;
@ -13,3 +16,6 @@ export async function main(ns: NS){
function getServers(ns: NS) { function getServers(ns: NS) {
ns.tprint(recursiveScan(ns)); ns.tprint(recursiveScan(ns));
} }
function getHackingLevels(ns: NS) {
ns.tprint(recursiveHackingRequired(ns))
}