-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<link rel="stylesheet" href="stylefile.css"> | ||
</head> | ||
<body> | ||
<h1>BlackJack</h1> | ||
<p id="message-el">Want to play a round?</p> | ||
<p id="cards-el">Cards:</p> | ||
<p id="sum-el">Sum:</p> | ||
<button onclick="startGame()">START GAME</button> | ||
<button onclick="newCard()">NEW CARD</button> | ||
<script src="js.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,58 @@ | ||
// let firstCard=6 | ||
// let secondCard=12 | ||
// let sum =firstCard +secondCard | ||
// if(sum>21){ | ||
// console.log("Do you want to draw a new card? 😊") | ||
// }else if(sum===21){ | ||
// console.log("wohoo! You've got Blackjaack! 👌 ") | ||
// }//else if(sum>21){ | ||
// // console.log("You'he out of the Game 😒") | ||
// // } | ||
// else{ | ||
// console.log("fuck you") | ||
// } | ||
// let age =22 | ||
// if(age<=21){ | ||
// console.log("i will fuck you the hard , you are not allowed") | ||
// } | ||
// else{ | ||
// console.log("u can fuck other") | ||
// } | ||
// let age=100 | ||
// if(age>100){ | ||
// console.log("you are not eligible") | ||
// }else if(age===100){ | ||
// console.log("You are eligible") | ||
// }else{ | ||
// console.log("Not eligible, you have already gotten one") | ||
// } | ||
let firstCard=10 | ||
let secondCard=4 | ||
let sum=firstCard+secondCard | ||
let hasBlackjack=false | ||
isAlive=true | ||
let message="" | ||
|
||
let messageEl=document.getElementById("message-el") | ||
//let sumEl=document.getElementById("sum-el") | ||
let sumEl=document.querySelector("#sum-el") | ||
let cardsEl=document.getElementById("cards-el") | ||
function startGame(){ | ||
sumEl.textContent="sum: "+ sum | ||
cardsEl.textContent="Cards: "+ firstCard + " " +secondCard | ||
if (sum<=20){ | ||
message="Do you want to draw a new card? 😊" | ||
}else if(sum===21){ | ||
message="you got BlackJack!" | ||
hasBlackjack=true | ||
} | ||
else{ | ||
message="You're out of the game!" | ||
isAlive=false | ||
} | ||
console.log(message) | ||
messageEl.textContent=message | ||
} | ||
function newCard(){ | ||
console.log("Drawing a new card from the deck!") | ||
} |
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,26 @@ | ||
body{ | ||
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; | ||
background-image: url(table.png); | ||
background-size: cover; | ||
text-align: center; | ||
color: white; | ||
font-weight: bold; | ||
} | ||
h1{ | ||
color: goldenrod; | ||
} | ||
|
||
message-el{ | ||
font-style: italic; | ||
} | ||
button{ | ||
color: #016f32; | ||
width: 150px; | ||
background: goldenrod; | ||
padding-top: 5px; | ||
font-weight: bold; | ||
border:none; | ||
border-radius: 2px; | ||
margin-top: 2px; | ||
margin-bottom: 2px; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
</head> | ||
|
||
|
||
<body> | ||
<h1>Registration From</h1> | ||
<form action=""> | ||
<label for="username">Username :</label> | ||
<input type="text" placeholder="Username"> | ||
<br><br> | ||
<label for="email">Email :</label> | ||
<input type="text" placeholder="email"> | ||
<br><br> | ||
<label for="dob">Date of birth</label> | ||
<input type="text" placeholder="dob"> | ||
</form> | ||
</body> | ||
|
||
|
||
|
||
</html> |
Empty file.