i downloaded a java billiard game. I want to modify it.
Note: the sum of the score is store in score_text_total
So when the player shoots the Ball with sum of less than 10, a picture, for example, of a DOG will show
If sum of ball shoots is more than 10 but less 20, picture of CAT (replaces/hides the DOG picture)
If sum of ball shoots is more than 30, a picture of trophy appears (replaces/hides the CAT picture)
<!doctype html>
<html lang="en">
<head>
</style>
</head>
<body>
<img src="assets/images/DOG.gif" style="display: none; background: #000;" id="DOG"/>
<img src="assets/images/CAT.gif" style="display: none; background: #ff0000;" id="CAT"/>
<script type="text/javascript">
var DOG = document.getElementById('DOG');
var CAT = document.getElementById('CAT');
function picture() {
if(curent_score < 10) {
DOG.style.display = 'block';
CAT.style.display = 'none';
}
else {
DOG.style.display = 'none';
CAT.style.display = 'block';
}
}
</script>
</body>
</html>