Useless config is bad config. Kudos @eulerscheZahl
[troll.git] / src / main / java / com / codingame / game / View.java
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[] = {