Skip to content

Commit

Permalink
bLACK
Browse files Browse the repository at this point in the history
-JACK
  • Loading branch information
praveen05092003 committed Nov 22, 2022
1 parent eeb2161 commit 114d769
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Black_jack/index.html
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>
58 changes: 58 additions & 0 deletions Black_jack/js.js
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!")
}
26 changes: 26 additions & 0 deletions Black_jack/stylefile.css
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;
}
Binary file added Black_jack/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions tick_tac/index.html
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 added tick_tac/style.css
Empty file.

0 comments on commit 114d769

Please sign in to comment.