import * as seedrandom from 'seedrandom' ; import { int } from '../../../customTypings' ; export default class Random { private r : seedrandom . prng ; public constructor ( seed ) { this . r = seedrandom ( '' + seed ) ; } public next ( max ) { return Math . floor ( this . r ( ) * max ) ; } public nextInt ( max ) { return this . next ( max ) ; } public nextBoolean ( ) { return ! Math . round ( this . r ( ) ) ; } }