-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ecb57f
commit 8051c00
Showing
11 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Russian Roulette</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="game-container"> | ||
<h1>Russian Roulette</h1> | ||
<div class="target" id="target">🎯</div> | ||
<img id="waterGun" src="assets\images\Gun_Default.png" alt="Water Gun" class="water-gun"> | ||
<button id="shootButton">Shoot</button> | ||
<p id="message"></p> | ||
<p id="shotsLeft"></p> | ||
<p id="Deaths"></p> | ||
</div> | ||
<audio id="shotSound" src="assets\sounds\Gunsot Sound.wav"></audio> | ||
<script src="script.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<h1>Russian Roulette: A Game of Chance 🎲🔫</h1> | ||
|
||
<h3></h3>Get ready to test your luck in this thrilling game of Russian Roulette! This simple yet addictive game puts your nerves on edge as you spin the chamber and take your chances.<h3> | ||
<h2>Features:</h2> | ||
<ul> | ||
<li> Realistic Gun: A visually appealing gun model that adds to the tension.</li> | ||
<li>A Single Button to Play: Click the button to spin the chamber and fire!</li> | ||
<li>33% Chance of Death: The odds are against you, with a 1 in 3 chance of the gun firing.</li> | ||
<li>Death Counter: Keep track of your unlucky attempts with a visually displayed death counter.</li> | ||
<li>Thrilling Sound Effects: A realistic gunshot sound plays when you're unlucky.</li> | ||
</ul> | ||
<h2>Gameplay:</h2> | ||
<ul> | ||
<li>Click the button to "spin" the chamber.</li> | ||
<li>The game randomly decides whether or not the gun will fire.</li> | ||
<li>If the gun fires, you "die" and the death counter increases.</li> | ||
<li>Play again and see how long you can survive!</li> | ||
</ul> | ||
<h2>Game Points:</h2> | ||
<ul> | ||
<li>Gun: A visual representation of the weapon.</li> | ||
<li>Button: A clickable button that triggers the chamber spin.</li> | ||
<li>33% Chance: The probability of the gun firing.</li> | ||
<li>Death Counter: Displays the number of times you've been "shot."</li> | ||
</ul> | ||
<h3>Get ready for a game that's both thrilling and terrifying. Download Russian Roulette today and see how long you can survive!</h3> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
document.addEventListener("DOMContentLoaded", () => { | ||
const target = document.getElementById("target"); | ||
const shootButton = document.getElementById("shootButton"); | ||
const message = document.getElementById("message"); | ||
const shotsLeft = document.getElementById("shotsLeft"); | ||
const waterGun = document.getElementById("waterGun"); | ||
const shotSound = document.getElementById("shotSound"); | ||
|
||
let shots = 0; | ||
let Death = 0; | ||
shootButton.addEventListener("click", () => { | ||
shots++; | ||
const isShotSuccessful = Math.random() < 0.33; | ||
if (isShotSuccessful) { | ||
message.textContent = "Shot! You Died!"; | ||
target.style.color = "blue"; | ||
waterGun.src = "assets/images/Gun_Shoot.png"; | ||
Death++; | ||
shotSound.play(); | ||
} else { | ||
message.textContent = "Safe! You missed."; | ||
target.style.color = "black"; | ||
} | ||
shotsLeft.textContent = `Shots taken: ${shots}`; | ||
Deaths.textContent = `Deaths: ${Death}`; | ||
setTimeout(() => { waterGun.src = "assets/images/Gun_Default.png"; }, 3500); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background-color: #f0f0f0; | ||
} | ||
|
||
.game-container { | ||
text-align: center; | ||
} | ||
|
||
.target { | ||
font-size: 3rem; | ||
margin: 20px; | ||
} | ||
|
||
.water-gun { | ||
width: 200px; | ||
height: auto; | ||
margin: 20px; | ||
} | ||
|
||
button { | ||
padding: 10px 20px; | ||
font-size: 1rem; | ||
cursor: pointer; | ||
} | ||
|
||
#message { | ||
font-size: 1.2rem; | ||
margin-top: 20px; | ||
} | ||
|
||
#shotsLeft { | ||
font-size: 1rem; | ||
margin-top: 10px; | ||
} | ||
|
||
#Deaths { | ||
font-size: 1rem; | ||
margin-top: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.