mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-07-08 00:01:59 +00:00
[AB-xxx] making lovecalc deterministic (simple approach)
This commit is contained in:
@@ -105,7 +105,9 @@ public class EntertainmentServiceBean implements EntertainmentService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getLoveCalcValue(String firstPart, String secondPart) {
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user