Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Memory Game #28

Merged
merged 2 commits into from
Jul 15, 2021
Merged
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
Binary file added Memory Game/assets/images/Favicons/favicon.ico
Binary file not shown.
Binary file added Memory Game/assets/images/burger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/donut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/fried-chicken.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/ice-cream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/milkshake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/muffin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/noodles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/images/pizza.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Memory Game/assets/sounds/correct.wav
Binary file not shown.
Binary file added Memory Game/assets/sounds/game-over.wav
Binary file not shown.
Binary file added Memory Game/assets/sounds/wrong.wav
Binary file not shown.
156 changes: 156 additions & 0 deletions Memory Game/css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
* {
font-family: 'Poppins';
margin: 0;
padding: 0;
}

.main-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.grid {
display: flex;
flex-direction: column;
align-items: center;
}

.score-board {
display: flex;
background: #ff942e;
margin: 50px 0;
width: 528px;
border-radius: 5px;
color: white;
align-items: center;
justify-content: center;
text-shadow: 2px 4px 3px grey;
}

.score-count {
background-color: #fee4cb;
margin: 20px 0;
margin-right: 10px;
border-radius: 7px;
text-shadow: none;
color: #ff942e;
box-shadow: 1px 1px 3px grey;
}

.score {
font-size: 2.5rem;
padding: 20px 40px;
}

.row {
display: flex;
}

img {
height: 100px;
width: 100px;
border-radius: 5px;
color: #fee4cb;
position: relative;
z-index: -1;
}

.btn {
padding: 0;
border: none;
margin: 7px;
width: 120px;
border-radius: 5px;
height: 120px;
box-shadow: 0.5px 1px 5px grey;
background-color: #fee4cb;
transition: 0.8s;
}

.btn-hover:hover {
background-color: #ff942e;
transition: 0.8s;
cursor: pointer;
}

.restart {
margin: 50px 0;
padding: 10px 30px;
font-size: 1.5rem;
border: 2px solid #ff942e;
border-radius: 4px;
background-color: transparent;
color: #ff942e;
transition: 0.8s;
font-weight: 500;
}

.restart:hover {
background-color: #ff942e;
color: white;
transition: 0.8s;
cursor: pointer;
box-shadow: 1px 2px 8px grey;
}

@media (max-width: 800px) {
.btn {
margin: 5px;
height: 100px;
width: 100px;
}
img {
height: 75px;
width: 75px;
}
.score-board {
width: 430px;
}
.score {
font-size: 2rem;
}
}

@media (max-width: 450px) {
.btn {
margin: 4px;
height: 90px;
width: 90px;
}
img {
height: 75px;
width: 75px;
}
.score-board {
width: 385px;
}
.score {
font-size: 1.8rem;
}
.restart {
font-size: 1rem;
}
}

@media (max-width: 400px) {
.btn {
margin: 4px;
height: 70px;
width: 70px;
}
img {
height: 60px;
width: 60px;
}
.score-board {
width: 305px;
}
.score {
font-size: 1.5rem;
}
.score-count h1 {
padding: 10px 20px;
}
}
142 changes: 142 additions & 0 deletions Memory Game/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="icon" href="assets/images/favicons/favicon.ico">

<title>Memory Game</title>

<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap" rel="stylesheet">

<!-- CSS -->
<link rel="stylesheet" href="css/styles.css">

</head>
<body>

<div class="main-container">

<div class="score-board">
<h1 class="score">Live Score :</h1>
<div class="score-count">
<h1 class="score">0</h1>
</div>
</div>

<div class="grid">

<div class="row">

<div>
<button class="btn btn-hover">
<img src="assets/images/donut.png" alt="">
</button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/burger.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/pizza.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/ice-cream.png" alt=""></button>
</div>

</div>


<div class="row">

<div>
<button class="btn btn-hover">
<img src="assets/images/milkshake.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/noodles.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/fried-chicken.png" alt=""></button>
</div>

</div>

<div class="row">

<div>
<button class="btn btn-hover">
<img src="assets/images/milkshake.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

</div>

<div class="row">

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

<div>
<button class="btn btn-hover">
<img src="assets/images/muffin.png" alt=""></button>
</div>

</div>

<button class="restart">Play Again</button>

</div>


</div>


<!-- JS Scripts -->
<script src="js/app.js"></script>

</body>
</html>
Loading