From: JBM Date: Thu, 21 May 2020 15:38:27 +0000 (+0200) Subject: Messaging X-Git-Url: https://troll.desast.re/troll.git/commitdiff_plain/83de865a87657f62bc949433539351945bd04314?ds=sidebyside Messaging --- diff --git a/.gitignore b/.gitignore index a786704..5a6e008 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ target/ .vscode .factorypath bin +*~ diff --git a/PLAN.org b/PLAN.org index 8957eba..ed0f737 100644 --- a/PLAN.org +++ b/PLAN.org @@ -2,10 +2,7 @@ * DONE document maps * DONE document length/distance thingy * TODO debug rotating avatar -* TODO easter egg for YannT -meta^5 @YannT :: (a -> b) -> f1 (f2 (f3 a)) -> f1 (f2 (f3 b)) -* TODO messages -tortue -by the power of grayskull +* DONE easter egg for YannT +* DONE messages * TODO referee cleanup * DONE upgrade deps diff --git a/config/Boss.java b/config/Boss.java index d3c297d..548c083 100644 --- a/config/Boss.java +++ b/config/Boss.java @@ -1,10 +1,17 @@ import java.util.Random; import java.util.Scanner; -public class Player2 { +public class Boss { + 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(0); + Random random = new Random(); int roadLength = in.nextInt(); int initialStones = in.nextInt(); @@ -13,8 +20,14 @@ public class Player2 { int trollDistance = in.nextInt(); int stones = in.nextInt(); int opponentStones = in.nextInt(); - - System.out.println(random.nextInt(stones+1)); + + 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)); + } } } } diff --git a/config/Boss.sh b/config/Boss.sh deleted file mode 100644 index 0b3832f..0000000 --- a/config/Boss.sh +++ /dev/null @@ -1 +0,0 @@ -exec yes 1 diff --git a/config/statement_en.html b/config/statement_en.html index 0102747..89a0e27 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -169,6 +169,9 @@ Change Log