CODEBASE: Add Jsonable Map and Set types, move player.sourceFiles to a map (#473)

This commit is contained in:
Snarling
2023-04-18 03:19:45 -04:00
committed by GitHub
parent c44bdc1018
commit 0df984eea0
55 changed files with 439 additions and 532 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
import { IPAddress } from "src/Types/strings";
import { getRandomByte } from "./helpers/getRandomByte";
/**
* Generate a random IP address
* Does not check to see if the IP already exists in the game
*/
export const createRandomIp = (): string =>
`${getRandomByte(99)}.${getRandomByte(9)}.${getRandomByte(9)}.${getRandomByte(9)}`;
export const createRandomIp = (): IPAddress =>
`${getRandomByte(99)}.${getRandomByte(9)}.${getRandomByte(9)}.${getRandomByte(9)}` as IPAddress;