mostly ui chages

This commit is contained in:
HearMeWhisper 2021-09-30 22:38:44 -04:00
parent 2af07974ff
commit 88110368a6
2 changed files with 29 additions and 12 deletions

View File

@ -1,14 +1,14 @@
body {
background-color: #23313d;
background-color: #42739e;
cursor: default;
font-size: 130%;
}
#score {
border: 2px solid black;
background-color: black;
background-color: rgb(46, 45, 45);
color: white;
border-radius: 7px;
border-radius: 15px;
float: left;
border-collapse: collapse;
border-style: hidden;
@ -28,7 +28,7 @@ body {
}
.cells1 {
background-color: #70d38b;
background-color: #d86e60;
text-align: center;
padding-top: 4%;
padding-bottom: 4%;
@ -41,7 +41,7 @@ body {
.dice {
border: 5px solid black;
width: 80%;
background-color: #53a788;
background-color: #56667e;
align-self: center;
margin-top: 7%;
padding: 12px;
@ -81,7 +81,7 @@ body {
#btn {
border-radius: 10px;
background-color: #cbffd8;
background-color: #e9eb85;
color: 23313d;
text-align: center;
border: 2.5px solid black;
@ -94,7 +94,7 @@ body {
#fullscreen {
display: flex;
border-radius: 10px;
background-color: #cbffd8;
background-color: #e9eb85;
color: #23313d;
text-align: center;
border: 2.5px solid black;
@ -126,13 +126,14 @@ body {
}
#cell13 {
color: #cbffd8;
color: #c6f2ff;
background-color: #181c28;
}
#cell31 {
color: #cbffd8;
color:#c6f2ff;
background-color: #181c28;
border-radius: 15px;
}
#how:hover {
@ -145,6 +146,7 @@ body {
float: right;
}
@media (max-device-width: 550px) {
.cells {
border-bottom: 4px solid #2E2E45;

View File

@ -41,7 +41,7 @@ function how_to() {
function hold_score(cell) {
if ((cell.className == "cells" && turn_over == false) || (document.getElementById("cell29").className == "cells1" && yatzee_counter == true)) {
cell.className = "cells1";
document.getElementById("cell1").style.borderTopRightRadius = "5px";
document.getElementById("cell1").style.borderTopRightRadius = "15px";
turn_over = true;
bottom_score();
upper_score();
@ -78,7 +78,13 @@ function hold_score(cell) {
document.getElementById("cell13").innerHTML = sub_total;
document.getElementById("cell31").innerHTML = final_total;
if (game_over == true) {document.getElementById('btn').innerHTML = "New Game?"; drawboard();}
if (game_over == true) {
document.getElementById('btn').innerHTML = "New Game?";
document.getElementById('btn').onclick = function() {
drawboard();
};
}
}
/*
sub_total = 0;
@ -90,6 +96,15 @@ function hold_score(cell) {
}
function drawboard() {
if (game_over == true) {
document.getElementById('btn').innerHTML = "New Game?";
document.getElementById('btn').onclick = function() {
window.location.reload(false);
};
game_over = false;
return;
}
document.getElementById('highscore').innerHTML = "Your High Score: " + localStorage.getItem('high_score');
document.getElementById("scorecard").innerHTML = "";
document.getElementById('btn').innerHTML = 'Start Game!';
@ -421,7 +436,7 @@ function upper_score() {
game_over = true;
if (Number(localStorage.getItem('high_score')) < final_total) localStorage.setItem('high_score', final_total);
document.getElementById('btn').onclick = function() {
window.location.reload(false);
drawboard();
};