import { MersenneTwister19937 , Random , nativeMath } from "random-js" ; export function getRandom ( opts ) { const seed = opts . seed || nativeMath . next ( ) ; if ( opts . verbose ) { console . log ( `Random seed is: ${ seed }` ) ; } let engine = MersenneTwister19937 . seed ( seed ) ; return new Random ( engine ) ; }