diff --git a/server/src/main/java/fr/lnl/game/server/utils/Cardinal.java b/server/src/main/java/fr/lnl/game/server/utils/Cardinal.java index b7dab95..3b8ff91 100644 --- a/server/src/main/java/fr/lnl/game/server/utils/Cardinal.java +++ b/server/src/main/java/fr/lnl/game/server/utils/Cardinal.java @@ -8,5 +8,11 @@ public enum Cardinal { NORTH_EAST, NORTH_WEST, SOUTH_EAST, - SOUTH_WEST + SOUTH_WEST; + + public static Cardinal getRandom() { + return values()[(int) (Math.random() * values().length)]; + } } + +