diff --git a/css/style.css b/css/style.css index f85351a..0e02b0b 100644 --- a/css/style.css +++ b/css/style.css @@ -1,10 +1,16 @@ +img#chances { + margin-top: -210px; + position: absolute; + margin-left: -20px; +} + #old-rows { display: none; } #cons-container{ margin-bottom: 20px; - margin-right: 50px; + margin-right: 30px; display: inline-block; vertical-align: top; } @@ -17,7 +23,7 @@ } .container .text-center { - margin: 0 0 40px 0; + margin: 10px 0 40px 0; } .jumbotron { diff --git a/index.html b/index.html index 62a22a7..1467a87 100644 --- a/index.html +++ b/index.html @@ -25,11 +25,13 @@

Forca Fonética

-
-
+
+ -
+
+
+
diff --git a/js/functions.js b/js/functions.js index cdc403c..916af82 100644 --- a/js/functions.js +++ b/js/functions.js @@ -215,7 +215,12 @@ gameOver: function(){ loseOneChance: function(){ this.chances.current--; - $("#chances").text(this.chances.current); + app.refreshHangman(); +}, + +refreshHangman: function(){ + //$("#chances").text(this.chances.current); + $("#chances").attr("src", "img/forca-" + this.chances.current + ".png"); }, //tests victory, returns true or false @@ -233,7 +238,7 @@ victory: function(){ newGame: function(){ //resets chances this.chances.current = this.chances.MAX; - $("#chances").text(this.chances.current); + app.refreshHangman(); app.resetbuttons(); app.getNewWord(); app.writeWord();