mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 08:57:32 +01:00
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
import { getRandomByte } from "./helpers/getRandomByte";
|
|
|
|
/**
|
|
* Generate a random IP address
|
|
* Does not check to see if the IP already exists in the game
|
|
*/
|
|
export function createRandomIp(): string {
|
|
const ip: string = getRandomByte(99) + '.' +
|
|
getRandomByte(9) + '.' +
|
|
getRandomByte(9) + '.' +
|
|
getRandomByte(9);
|
|
|
|
return ip;
|
|
}
|