function randint(low:number, max?:number) { return Math.floor(Math.random() * 10) % (max ?? low) + (max ? low : 0); }