about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/1/RollLoadedDie.java
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT2.2/labwork/1/RollLoadedDie.java')
-rw-r--r--usth/ICT2.2/labwork/1/RollLoadedDie.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/usth/ICT2.2/labwork/1/RollLoadedDie.java b/usth/ICT2.2/labwork/1/RollLoadedDie.java
new file mode 100644
index 0000000..161fd93
--- /dev/null
+++ b/usth/ICT2.2/labwork/1/RollLoadedDie.java
@@ -0,0 +1,10 @@
+import java.util.concurrent.ThreadLocalRandom;
+
+class RollLoadedDie
+{
+  public static void main(String... args)
+  {
+    int x = ThreadLocalRandom.current().nextInt(1, 9);
+    System.out.println((x < 6) ? x : 6);
+  }
+}