Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Games/Anime_Clicker/fim_de_jogo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,37 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="estilo.css" />
<title>Document</title>
<style>
.score-display {
position: fixed;
top: 20px;
left: 45%;
transform: translateX(-50%);
font-size: 24px;
font-weight: bold;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 15px 25px;
border-radius: 8px;
z-index: 1000;
}
</style>
<script>
function getScoreFromURL() {
let params = new URLSearchParams(window.location.search)
let sucessos = params.get('sucessos') || 0
let tentativas = params.get('tentativas') || 0

document.getElementById('score').innerHTML = 'Final score = ' + sucessos + '/' + tentativas
}

window.onload = getScoreFromURL
</script>
</head>

<body>
<div class="score-display" id="score">Final score = 0/0</div>

<div class="container">
<div class="row">
<div class="col">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions Games/Anime_Clicker/jogo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ let largura = 0
let altura = 0
let vidas = 1
let tempo = 30
let sucessos = 0
let totalTentativas = 0

let criaMosquitoTempo = 2000

Expand Down Expand Up @@ -47,7 +49,7 @@ let cronometro = setInterval(function() {
if (tempo < 0) {
clearInterval(cronometro)
clearInterval(criaMosquito)
window.location.href = 'vitoria.html'
window.location.href = 'vitoria.html?sucessos=' + sucessos + '&tentativas=' + totalTentativas
} else {
document.getElementById('cronometro').innerHTML = tempo
}
Expand All @@ -59,11 +61,12 @@ function posicaoRandomica() {
//Remover mosquito anterior (caso exista).
if (document.getElementById('mosquito')) {
document.getElementById('mosquito').remove()
totalTentativas++

//console.log('elemento selecionado foi: v' + vidas)
if (vidas > 3) {

window.location.href = 'fim_de_jogo.html'
window.location.href = 'fim_de_jogo.html?sucessos=' + sucessos + '&tentativas=' + totalTentativas
} else {
document.getElementById('v' + vidas).src = "img/coracao_vazio.png"

Expand All @@ -81,7 +84,6 @@ function posicaoRandomica() {
posicaoY = posicaoY < 0 ? 0 : posicaoY

console.log(posicaoX, posicaoY)

//Criando o elemento "mosquito" no HTML
let mosquito = document.createElement('img')
mosquito.src = 'img/mosca.png'
Expand All @@ -91,10 +93,13 @@ function posicaoRandomica() {
mosquito.style.position = 'absolute'
mosquito.id = 'mosquito'
mosquito.onclick = function() {
sucessos++
totalTentativas++
this.remove()
}

document.body.appendChild(mosquito)
document.body.appendChild(mosquito)

}

Expand Down
28 changes: 28 additions & 0 deletions Games/Anime_Clicker/vitoria.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,37 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="estilo.css" />
<title>Document</title>
<style>
.score-display {
position: fixed;
top: 20px;
left: 45%;
transform: translateX(-50%);
font-size: 24px;
font-weight: bold;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 15px 25px;
border-radius: 8px;
z-index: 1000;
}
</style>
<script>
function getScoreFromURL() {
let params = new URLSearchParams(window.location.search)
let sucessos = params.get('sucessos') || 0
let tentativas = params.get('tentativas') || 0

document.getElementById('score').innerHTML = 'Final score = ' + sucessos + '/' + tentativas
}

window.onload = getScoreFromURL
</script>
</head>

<body>
<div class="score-display" id="score">Final score = 0/0</div>

<div class="container">
<div class="row">
<div class="col">
Expand Down
112 changes: 86 additions & 26 deletions Games/my_mine_sweeper/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,105 @@
body{
background: rgb(238,174,202);
background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%);
min-height: 100vh;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
.container #heading{
font-size: 5rem;
color: rgba(29, 43, 248, 0.74);
border: 2px solid;
margin: auto;
font-size: 3rem;
color: rgba(29, 43, 248, 0.9);
border: 3px solid rgba(29, 43, 248, 0.5);
border-radius: 1rem;
padding: 1rem;
margin: 0 auto 2rem;
text-align: center;
background-color: rgba(255, 255, 255, 0.3);
}
.levels{
display: flex;
justify-content: center;
align-items: center;
margin-top: 1rem;
margin-bottom: 1rem;
gap: 0.5rem;
}
.levels label{
font-size: 2rem;

font-size: 1.3rem;
font-weight: 600;
color: rgba(29, 43, 248, 0.9);
font-family: Arial, Helvetica, sans-serif;
min-width: 100px;
text-align: right;
}
#size{
font-size: 1.2rem;
color: blueviolet;
position: relative;
border: 2px solid black;

color: #333;
font-weight: 500;
border: 2px solid rgba(29, 43, 248, 0.6);
font-family: Arial, Helvetica, sans-serif;
padding: 10px 15px;
border-radius: 0.5rem;
cursor: pointer;
background-color: white;
min-width: 120px;
}
#diff{
font-size: 1.2rem;
color: blueviolet;
position: relative;
border: 2px solid black;

color: #333;
font-weight: 500;
border: 2px solid rgba(29, 43, 248, 0.6);
font-family: Arial, Helvetica, sans-serif;
padding: 10px 15px;
border-radius: 0.5rem;
cursor: pointer;
background-color: white;
min-width: 120px;
}
#reset{
font-size: 1.2rem;
color: blueviolet;
position: relative;
margin-top: 30px;
border-radius: 0.5rem;
padding: 5px 25px 5px 25px;
border: 2px solid black;

font-size: 1.3rem;
font-weight: 600;
color: white;
border-radius: 0.6rem;
padding: 10px 40px;
border: none;
font-family: Arial, Helvetica, sans-serif;
cursor: pointer;
background: linear-gradient(135deg, rgba(29, 43, 248, 0.8), rgba(148,187,233,1));
transition: all 0.3s;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
margin-left: 100px;
}

#reset:hover{
transform: translateY(-2px);
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
background: linear-gradient(135deg, rgba(29, 43, 248, 1), rgba(148,187,233,0.9));
}

#reset:active{
transform: translateY(0);
}
span {
font-family: Arial, Helvetica, sans-serif;
}

#text {
display: block;
font-size: 2.5rem;
font-weight: bold;
color: #d32f2f;
text-align: center;
margin: 2rem auto;
padding: 1.5rem;
font-family: Arial, Helvetica, sans-serif;
background-color: rgba(255, 255, 255, 0.5);
border-radius: 1rem;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
max-width: 400px;
}

#grid {
display: grid;
grid-template-columns: repeat(3, 30px);
Expand All @@ -76,11 +129,18 @@ span {

}
#grid25 #mines{
font-size: 2rem;
font-size: 1.5rem;
font-weight: 600;
color: rgba(29, 43, 248, 0.9);
margin-bottom: 0.5rem;
font-family: Arial, Helvetica, sans-serif;
}
#timer{
font-size: 2rem;

font-size: 1.5rem;
font-weight: 600;
color: rgba(29, 43, 248, 0.9);
margin-bottom: 1rem;
font-family: Arial, Helvetica, sans-serif;
}
.visible {
font-size: 16px;
Expand Down
Binary file modified assets/images/my_mine_sweeper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.