mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 03:00:56 +02:00
Refactored Netscript with Acorns parser. Major rebalancing. Add TIX API. Add round(), purchaseServer().
This commit is contained in:
@@ -50,4 +50,10 @@ function compareArrays(a1, a2) {
|
||||
|
||||
function printArray(a) {
|
||||
return "[" + a.join(", ") + "]";
|
||||
}
|
||||
|
||||
//Returns bool indicating whether or not its a power of 2
|
||||
function powerOfTwo(n) {
|
||||
if (isNaN(n)) {return false;}
|
||||
return n && (n & (n-1)) === 0;
|
||||
}
|
||||
Reference in New Issue
Block a user