interaction map type

This commit is contained in:
2026-03-15 13:10:13 +01:00
parent 621659a352
commit 57b753a6b5
7 changed files with 2854 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
import { Injectable } from "@angular/core";
@Injectable({ providedIn: 'root' })
export class RandomService {
private rollRandom(min: number, max: number): number {
return Math.floor(Math.random() * (max - min) + min);
}
public matchesChance(chance: number, max: number): boolean {
const random = this.rollRandom(0, max);
console.log(random, chance);
if (random < chance) {
return true;
}
return false;
}
}