From 9e2ddeb55321b09086a5a27254197d783847e6e3 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:50:36 +0200 Subject: Initial commit --- src/main/java/com/encrox/zombie/Misc.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 src/main/java/com/encrox/zombie/Misc.java (limited to 'src/main/java/com/encrox/zombie/Misc.java') diff --git a/src/main/java/com/encrox/zombie/Misc.java b/src/main/java/com/encrox/zombie/Misc.java new file mode 100755 index 0000000..feeab8b --- /dev/null +++ b/src/main/java/com/encrox/zombie/Misc.java @@ -0,0 +1,12 @@ +package com.encrox.zombie; + +import java.util.Random; + +public class Misc { + + public static Object random(Object[] arr) { + int rnd = new Random().nextInt(arr.length); + return arr[rnd]; + } + +} -- cgit v1.2.1