28 lines
534 B
Java
28 lines
534 B
Java
package fr.monkhanny.dorfromantik.game;
|
|
|
|
import java.util.Random;
|
|
|
|
/**
|
|
* Représente un objet de jeu qui gère les fonctionnalités générales.
|
|
*/
|
|
public class Game {
|
|
private Random random;
|
|
|
|
// Nouveau constructeur qui accepte un seed
|
|
public Game(long seed) {
|
|
this.random = new Random(seed);
|
|
}
|
|
|
|
// Constructeur par défaut pour conserver la flexibilité
|
|
public Game() {
|
|
this.random = new Random();
|
|
}
|
|
|
|
public int getRandomInt(int max) {
|
|
return random.nextInt(max);
|
|
}
|
|
}
|
|
|
|
|
|
|