Brighten up the troll's mouth and pants
authorJBM <jbm@codingame.com>
Fri, 29 May 2020 10:21:06 +0000 (12:21 +0200)
committerJBM <jbm@codingame.com>
Fri, 29 May 2020 10:21:06 +0000 (12:21 +0200)
src/main/java/com/codingame/game/View.java
src/main/resources/view/assets/game.xcf
src/main/resources/view/assets/pants_blue.png [new file with mode: 0644]
src/main/resources/view/assets/pants_green.png [new file with mode: 0644]
src/main/resources/view/assets/pants_perv.png [new file with mode: 0644]
src/main/resources/view/assets/pants_red.png [new file with mode: 0644]
src/main/resources/view/assets/troll.png [deleted file]
src/main/resources/view/assets/troll_body.png [new file with mode: 0644]

index 9ef1d6b..99ad664 100644 (file)
@@ -236,7 +236,7 @@ class View {
     Model model;
     Random random = new Random();
     Text trollMessage;
     Model model;
     Random random = new Random();
     Text trollMessage;
-    Sprite troll;
+    Group troll;
     Text trollPositionGauge;
     Player p0 = new Player(), p1 = new Player();
     Text turnCounter; int _turns = 0;
     Text trollPositionGauge;
     Player p0 = new Player(), p1 = new Player();
     Text turnCounter; int _turns = 0;
@@ -349,12 +349,19 @@ class View {
     }
 
     private void drawTroll() {
     }
 
     private void drawTroll() {
-        troll = graphicEntityModule.createSprite()
-            .setImage("troll.png")
+        Sprite trollBody = graphicEntityModule.createSprite()
+            .setImage("troll_body.png")
             .setAnchorX(0.5)
             .setAnchorY(1)
             .setAnchorX(0.5)
             .setAnchorY(1)
+            .setTint(0xfac200);
+        Sprite trollPants = graphicEntityModule.createSprite()
+            .setImage("pants_red.png")
+            .setAnchorX(0.5)
+            .setAnchorY(1);
+        troll = graphicEntityModule.createGroup(trollBody, trollPants)
             .setX(1920/2)
             .setY(880)
             .setX(1920/2)
             .setY(880)
+            .setScaleX(random.nextInt(2) == 0 ? 1 : -1)
             .setZIndex(2);
         trollPositionGauge = graphicEntityModule.createText()
             .setZIndex(2)
             .setZIndex(2);
         trollPositionGauge = graphicEntityModule.createText()
             .setZIndex(2)
@@ -537,7 +544,7 @@ class View {
         // programming
         { "vi < emacs", "i code with Notepad", "emacs > vi" },
         { "tabs < spaces", "gofmt FTW", "spaces < tabs" },
         // programming
         { "vi < emacs", "i code with Notepad", "emacs > vi" },
         { "tabs < spaces", "gofmt FTW", "spaces < tabs" },
-        { "LISP is the most\npowerful language", "HTML is a\nprogramming language", "Forth is the most\npowerful language" },
+        { "LISP is the most\npowerful language", "HTML is a\nprogramming language", "FORTH is the most\npowerful language" },
         { "static linking best", "symlinking best", "dynamic linking best" },
         { "NPE > SIGSEGV", "kernel panic", "SIGSEGV > NPE" },
         { "objects > functions", "it's closures\nall the way down", "functions > objects" },
         { "static linking best", "symlinking best", "dynamic linking best" },
         { "NPE > SIGSEGV", "kernel panic", "SIGSEGV > NPE" },
         { "objects > functions", "it's closures\nall the way down", "functions > objects" },
@@ -556,8 +563,8 @@ class View {
         { "searcho no chokudai", "GAimax is True AI", "Smitsimax FTW" },
         { "Automaton2000 > NN", "bots > humans", "AutomatonNN > 2000" },
         { "light theme best", "ascii > graphics", "dark theme best" },
         { "searcho no chokudai", "GAimax is True AI", "Smitsimax FTW" },
         { "Automaton2000 > NN", "bots > humans", "AutomatonNN > 2000" },
         { "light theme best", "ascii > graphics", "dark theme best" },
-        { "simulation beats heuristics", "true AI is just ifs", "heuristics beat simulation" },
-        { "bruteforce always prevails", "you'll timeout anyway", "algorithms always prevail" }
+        { "simulation > heuristics", "true AI is just ifs", "heuristics > simulation" },
+        { "bruteforce FTW", "you'll timeout anyway", "algorithms FTW" }
     };
 
     String isotropic[] = {
     };
 
     String isotropic[] = {
index b09d55d..12172f3 100644 (file)
Binary files a/src/main/resources/view/assets/game.xcf and b/src/main/resources/view/assets/game.xcf differ
diff --git a/src/main/resources/view/assets/pants_blue.png b/src/main/resources/view/assets/pants_blue.png
new file mode 100644 (file)
index 0000000..3e93ec4
Binary files /dev/null and b/src/main/resources/view/assets/pants_blue.png differ
diff --git a/src/main/resources/view/assets/pants_green.png b/src/main/resources/view/assets/pants_green.png
new file mode 100644 (file)
index 0000000..a74ca11
Binary files /dev/null and b/src/main/resources/view/assets/pants_green.png differ
diff --git a/src/main/resources/view/assets/pants_perv.png b/src/main/resources/view/assets/pants_perv.png
new file mode 100644 (file)
index 0000000..8d46119
Binary files /dev/null and b/src/main/resources/view/assets/pants_perv.png differ
diff --git a/src/main/resources/view/assets/pants_red.png b/src/main/resources/view/assets/pants_red.png
new file mode 100644 (file)
index 0000000..b9cfe5e
Binary files /dev/null and b/src/main/resources/view/assets/pants_red.png differ
diff --git a/src/main/resources/view/assets/troll.png b/src/main/resources/view/assets/troll.png
deleted file mode 100644 (file)
index be7d5d5..0000000
Binary files a/src/main/resources/view/assets/troll.png and /dev/null differ
diff --git a/src/main/resources/view/assets/troll_body.png b/src/main/resources/view/assets/troll_body.png
new file mode 100644 (file)
index 0000000..609e82e
Binary files /dev/null and b/src/main/resources/view/assets/troll_body.png differ