X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/53ea2acca5ca4aed78a3ba1b428ce37486fdc2e4..e0da785e68b21f4906f4f0bc849bb7bbab1abeb8:/src/test/java/PlayerRand.java?ds=inline diff --git a/src/test/java/PlayerRand.java b/src/test/java/PlayerRand.java new file mode 100644 index 0000000..a58d673 --- /dev/null +++ b/src/test/java/PlayerRand.java @@ -0,0 +1,33 @@ +import java.util.Random; +import java.util.Scanner; + +public class PlayerRand { + private final static String[] messages = { + "meta⁵ @YannT ∷ (a → b) → f1 (f2 (f3 a)) → f1 (f2 (f3 b))", + "By the power of Grayskull!", + "tortue", + "how is ur csb", + "YHBT" + }; + public static void main(String[] args) { + Scanner in = new Scanner(System.in); + Random random = new Random(); + + int roadLength = in.nextInt(); + int initialStones = in.nextInt(); + + while (true) { + int trollDistance = in.nextInt(); + int stones = in.nextInt(); + int opponentStones = in.nextInt(); + + if (random.nextInt(30) == 0) { + System.out.println(random.nextInt(stones+1) + " " + + messages[random.nextInt(messages.length)]); + } + else { + System.out.println(random.nextInt(stones+1)); + } + } + } +}