Skip to content

Commit 94bcdde

Browse files
author
Simon Fuet
committed
doc(random): Add doc related to random number generator
1 parent 33d2d3b commit 94bcdde

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

engine/core/src/main/java/com/codingame/gameengine/core/MultiplayerGameManager.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,26 @@ public int getPlayerCount() {
8585

8686
/**
8787
* <p>
88-
* The seed is used to generated parameters such as width and height.<br>
89-
* If a seed is present in the given input, the input value should override the generated values.
88+
* The seed is used to initialize the Random number generator.<br>
89+
* If a seed is present in the given input, the input value should override the generated values.<br>
90+
*
91+
* The seed should NOT be used directly in referee but through the random number generator provided by @method getRandom
9092
* </p>
9193
*
9294
* @return an <code>long</code> containing a given or generated seed.
9395
*/
94-
@Deprecated
9596
public long getSeed() {
9697
return seed;
9798
}
9899

100+
/**
101+
* <p>
102+
* The random generator is used to generated parameters such as width and height.<br>
103+
* The provided random generator is a SecureRandom using the SHAPRNG algorithm.<br>
104+
* </p>
105+
*
106+
* @return an <code>Random</code> containing a given or generated seed.
107+
*/
99108
public Random getRandom() {
100109
return random;
101110
}

0 commit comments

Comments
 (0)