mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
1.1 KiB
1.1 KiB
Home > bitburner > HackingFormulas > growThreads
HackingFormulas.growThreads() method
Calculate how many threads it will take to grow server to targetMoney. Starting money is server.moneyAvailable.
Signature:
growThreads(server: Server, player: Person, targetMoney: number, cores?: number): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| server | Server | Server info, typically from getServer |
| player | Person | Player info, typically from getPlayer |
| targetMoney | number | Desired final money, capped to server's moneyMax |
| cores | number | (Optional) Number of cores on the computer that will execute grow. |
Returns:
number
The calculated grow threads as an integer, rounded up.