mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-03 16:27:53 +00:00
[AB-xxx] making lovecalc deterministic (simple approach)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user