Repair gauges
[troll.git] / src / main / java / com / codingame / game / View.java
index dd350fe..7f883aa 100644 (file)
@@ -38,8 +38,6 @@ class View {
             int y = 220;
 
             Sprite border1 = graphicEntityModule.createSprite()
-            //    .setX(x)
-            //    .setY(y)
                 .setImage("frame.png")
                 .setAnchor(0.5)
                 .setScale(p0 ? -1 : 1)
@@ -47,15 +45,11 @@ class View {
                 .setTint(colorToken);
 
             Sprite border2 = graphicEntityModule.createSprite()
-            //    .setX(x)
-            //    .setY(y)
                 .setImage("frame_bg.png")
                 .setAnchor(0.5)
                 .setZIndex(20);
 
             Sprite avatarSprite = graphicEntityModule.createSprite()
-            //    .setX(x)
-            //    .setY(y)
                 .setZIndex(21)
                 .setImage(avatarToken)
                 .setAnchor(0.5)
@@ -74,13 +68,14 @@ class View {
                     .setFillColor(0x7f3f00)
                     .setAnchor(0.5);
 
-            stoneCounter = graphicEntityModule.createText("S")
+            stoneCounter = graphicEntityModule.createText()
                 .setX(x)
                 .setY(y+200)
                 .setZIndex(20)
                 .setFontSize(40)
                 .setFillColor(0x7f3f00)
                 .setAnchor(0.5);
+            updateStoneCounter();
 
             message = graphicEntityModule.createText()
                 .setX(p0 ? 15 : 1920-15)
@@ -110,7 +105,7 @@ class View {
                 .setAlpha(0);
         }
 
-        void setStone() {
+        void updateStoneCounter() {
             int stones = model.getStones();
             if (stones <= 0) {
                 stoneCounter.setText("Out of stones!");
@@ -197,6 +192,8 @@ class View {
             .setX(1980/2)
             .setY(980)
             .setFillColor(0xffffff);
+
+        moveTroll();
     }
 
     void moveTroll() {