Add files via upload

This commit is contained in:
Brad Stein 2018-01-02 17:17:31 -06:00 committed by GitHub
parent ec02486167
commit 2f0d42bba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -18,13 +18,13 @@ body{
}
.points_scored{
position: relative;
left: 0px;
position: absolute;
left: 5%;
}
.point_rate{
position: relative;
right: 0px;
position: absolute;
right: 7.5%;
}
.points_scored:before{

View File

@ -183,7 +183,7 @@ class Snek{
var score_rate_element = document.getElementsByClassName("point_rate")[0];
score_element.innerHTML = ((this.length - initial_tail_length) * 100).toString();
score_rate_element.innerHTML = ((this.length - initial_tail_length) * 100/this.alive).toString();
score_rate_element.innerHTML = ((this.length - initial_tail_length) * 100/this.alive).toPrecision(5).toString();
}
};