[AB-xxx] making lovecalc deterministic (simple approach)

This commit is contained in:
Sheldan
2024-10-29 22:36:04 +01:00
parent d2e8398fa4
commit bfaa5d6140

View File

@@ -105,7 +105,9 @@ public class EntertainmentServiceBean implements EntertainmentService {
@Override
public Integer getLoveCalcValue(String firstPart, String secondPart) {
return secureRandom.nextInt(100);
String fullInput = firstPart.toLowerCase() + secondPart.toLowerCase();
Random random = new Random(fullInput.hashCode());
return random.nextInt(100);
}
@Override