Skip to content

Commit 9dee158

Browse files
Mensagem do commit
1 parent 7d069d9 commit 9dee158

File tree

8 files changed

+259
-0
lines changed

8 files changed

+259
-0
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"iis.configDir": ""
3+
}

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Nicolas Bruno Pereira (https://codepen.io/Nicolas-Bruno-Pereira/pen/EaxGgWM)
4+
Fork of an original work Aula02 - Arquivo0 (https://codepen.io/profandre/pen/xbxPGjX)
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

dist/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en" >
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Aula02 - do Nicolas Bruno Pereira IFTM</title>
6+
<link rel="stylesheet" href="./style.css">
7+
8+
</head>
9+
<body>
10+
<!-- partial:index.partial.html -->
11+
<body>
12+
<img src="https://i.postimg.cc/GpCxYmvc/title.png" alt="Logo" class="logo">
13+
14+
<div class="container">
15+
<div class="content">
16+
<h2>Pra ganhar é preciso arriscar!</h2>
17+
<p> PEDRA, PAPEL ou TESOURA?</p>
18+
<button onclick="jogar()">Bora jogar!</button>
19+
</div>
20+
</div>
21+
<footer>Alura - Imersão DEV - 2025</footer>
22+
</body>
23+
<!-- partial -->
24+
<script src="./script.js"></script>
25+
26+
</body>
27+
</html>

dist/script.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
idade = prompt("Quantos anos você tem?");
2+
if (idade < 18) {
3+
} else {
4+
if (idade >= 18) {
5+
escolhajogador = prompt("Digite 1-pedra, 2-papel ou 3-tesoura?");
6+
escolhaComputador = Math.floor(Math.random() * 3) + 1;
7+
8+
if (escolhaComputador == escolhajogador) {
9+
alert("Empate!!");
10+
}
11+
if (escolhajogador == 1) {
12+
if (escolhaComputador == 2) {
13+
alert("O Computador venceu, escolheu papel");
14+
}
15+
if (escolhaComputador == 3) {
16+
alert("Jogador vence, Computador tesoura");
17+
}
18+
}
19+
if (escolhajogador == 2) {
20+
if (escolhaComputador == 1) {
21+
alert("O jogador venceu, computador pedra!!");
22+
}
23+
if (escolhaComputador == 3) {
24+
alert("Computador venceu, escolheu tesoura!");
25+
}
26+
}
27+
if (escolhajogador == 3) {
28+
if (escolhaComputador == 1) {
29+
alert("Computador venceu, escolheu pedra!");
30+
}
31+
if (escolhaComputador == 2) {
32+
alert("Jogador venceu, computador papel!!");
33+
}
34+
}
35+
}
36+
}

dist/style.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* Global Styles */
2+
body {
3+
background-color: black;
4+
margin: 0;
5+
padding: 0;
6+
font-family: Arial, sans-serif;
7+
color: white;
8+
position: relative;
9+
}
10+
11+
/* Logo Styles */
12+
.logo {
13+
position: absolute;
14+
top: 20px;
15+
right: 20px;
16+
max-width: 150px;
17+
width: auto;
18+
}
19+
20+
/* Container with the background image */
21+
.container {
22+
background: url("https://i.postimg.cc/TY28jTqJ/bg4-ia.jpg") no-repeat center
23+
center/cover;
24+
min-height: 100vh;
25+
display: flex;
26+
justify-content: center;
27+
align-items: center;
28+
}
29+
30+
/* Content div for text and button */
31+
.content {
32+
text-align: center;
33+
background-color: rgba(0, 0, 0, 0.5);
34+
padding: 20px 40px;
35+
border-radius: 8px;
36+
}
37+
38+
.content h2 {
39+
margin-bottom: 20px;
40+
}
41+
42+
/* Button Styles */
43+
button {
44+
background-color: #ff1b7b;
45+
border: none;
46+
padding: 10px 20px;
47+
font-size: 1.2em;
48+
color: white;
49+
cursor: pointer;
50+
transition: background-color 0.3s ease;
51+
}
52+
53+
button:hover {
54+
background-color: #1abc9c;
55+
}
56+
57+
/* Footer Styles */
58+
footer {
59+
text-align: center;
60+
padding: 10px;
61+
}

src/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<body>
2+
<img src="https://i.postimg.cc/GpCxYmvc/title.png" alt="Logo" class="logo">
3+
4+
<div class="container">
5+
<div class="content">
6+
<h2>Pra ganhar é preciso arriscar!</h2>
7+
<p> PEDRA, PAPEL ou TESOURA?</p>
8+
<button onclick="jogar()">Bora jogar!</button>
9+
</div>
10+
</div>
11+
<footer>Alura - Imersão DEV - 2025</footer>
12+
</body>

src/script.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
idade = prompt("Quantos anos você tem?");
3+
if (idade < 18) {
4+
} else {
5+
if (idade >= 18) {
6+
escolhajogador = prompt("Digite 1-pedra, 2-papel ou 3-tesoura?");
7+
escolhaComputador = Math.floor(Math.random() * 3) + 1;
8+
9+
if (escolhaComputador == escolhajogador) {
10+
alert("Empate!!");
11+
}
12+
if (escolhajogador == 1) {
13+
if (escolhaComputador == 2) {
14+
alert("O Computador venceu, escolheu papel");
15+
}
16+
if (escolhaComputador == 3) {
17+
alert("Jogador vence, Computador tesoura");
18+
}
19+
}
20+
if (escolhajogador == 2) {
21+
if (escolhaComputador == 1) {
22+
alert("O jogador venceu, computador pedra!!");
23+
}
24+
if (escolhaComputador == 3) {
25+
alert("Computador venceu, escolheu tesoura!");
26+
}
27+
}
28+
if (escolhajogador == 3) {
29+
if (escolhaComputador == 1) {
30+
alert("Computador venceu, escolheu pedra!");
31+
}
32+
if (escolhaComputador == 2) {
33+
alert("Jogador venceu, computador papel!!");
34+
}
35+
}
36+
}
37+
}

src/style.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* Global Styles */
2+
body {
3+
background-color: black;
4+
margin: 0;
5+
padding: 0;
6+
font-family: Arial, sans-serif;
7+
color: white;
8+
position: relative;
9+
}
10+
11+
/* Logo Styles */
12+
.logo {
13+
position: absolute;
14+
top: 20px;
15+
right: 20px;
16+
max-width: 150px;
17+
width: auto;
18+
}
19+
20+
/* Container with the background image */
21+
.container {
22+
background: url("https://i.postimg.cc/TY28jTqJ/bg4-ia.jpg") no-repeat center
23+
center/cover;
24+
min-height: 100vh;
25+
display: flex;
26+
justify-content: center;
27+
align-items: center;
28+
}
29+
30+
/* Content div for text and button */
31+
.content {
32+
text-align: center;
33+
background-color: rgba(0, 0, 0, 0.5);
34+
padding: 20px 40px;
35+
border-radius: 8px;
36+
}
37+
38+
.content h2 {
39+
margin-bottom: 20px;
40+
}
41+
42+
/* Button Styles */
43+
button {
44+
background-color: #ff1b7b;
45+
border: none;
46+
padding: 10px 20px;
47+
font-size: 1.2em;
48+
color: white;
49+
cursor: pointer;
50+
transition: background-color 0.3s ease;
51+
}
52+
53+
button:hover {
54+
background-color: #1abc9c;
55+
}
56+
57+
/* Footer Styles */
58+
footer {
59+
text-align: center;
60+
padding: 10px;
61+
}

0 commit comments

Comments
 (0)