updated Random() to SecureRandom() (#1670)
* updated Random() to SecureRandom() * batch 2 of SecureRandom updates
This commit is contained in:
committed by
GitHub
parent
c150871a94
commit
b423002e6c
@ -23,7 +23,7 @@
|
||||
|
||||
package com.iluwatar.gameloop;
|
||||
|
||||
import java.util.Random;
|
||||
import java.security.SecureRandom;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -80,7 +80,7 @@ public abstract class GameLoop {
|
||||
*/
|
||||
protected void processInput() {
|
||||
try {
|
||||
var lag = new Random().nextInt(200) + 50;
|
||||
var lag = new SecureRandom().nextInt(200) + 50;
|
||||
Thread.sleep(lag);
|
||||
} catch (InterruptedException e) {
|
||||
logger.error(e.getMessage());
|
||||
|
Reference in New Issue
Block a user