UNPKG

@nichathan-gaming/map-generator

Version:

Creates and generates a 2 dimensional array with various path generation functions.

9 lines (7 loc) 233 B
import random from "./random.js" /** * Randomly gets 0 or 1 and returns if it is equal to 0 * @returns {boolean} Either true or false */ const coinFlip = () => Math.floor(random.getNext() * 2)===0 export default coinFlip