This commit is contained in:
Olivier Gagnon
2022-05-25 11:43:43 -04:00
parent 6fef46d5df
commit 76ccb0ba36
25 changed files with 38 additions and 41 deletions
+2 -5
View File
@@ -4,8 +4,5 @@ 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;
}
export const createRandomIp = (): string =>
`${getRandomByte(99)}.${getRandomByte(9)}.${getRandomByte(9)}.${getRandomByte(9)}`;