mirror of
https://github.com/neogeek23/neogeek23.github.io.git
synced 2026-02-04 10:58:21 +00:00
Add files via upload
This commit is contained in:
parent
ec02486167
commit
2f0d42bba3
@ -18,13 +18,13 @@ body{
|
|||||||
}
|
}
|
||||||
|
|
||||||
.points_scored{
|
.points_scored{
|
||||||
position: relative;
|
position: absolute;
|
||||||
left: 0px;
|
left: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.point_rate{
|
.point_rate{
|
||||||
position: relative;
|
position: absolute;
|
||||||
right: 0px;
|
right: 7.5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.points_scored:before{
|
.points_scored:before{
|
||||||
|
|||||||
@ -183,7 +183,7 @@ class Snek{
|
|||||||
var score_rate_element = document.getElementsByClassName("point_rate")[0];
|
var score_rate_element = document.getElementsByClassName("point_rate")[0];
|
||||||
|
|
||||||
score_element.innerHTML = ((this.length - initial_tail_length) * 100).toString();
|
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();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user