Skip to content

Commit

Permalink
Merge pull request #447 from partha120804/reorganise
Browse files Browse the repository at this point in the history
Reorganised all files into separate folders
  • Loading branch information
ayush-t02 authored Jul 2, 2024
2 parents 42cfdb8 + b923f62 commit 8591dc8
Show file tree
Hide file tree
Showing 37 changed files with 385 additions and 391 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 22 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,23 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="styles/default.style.css">
<link rel="stylesheet" href="styles/index.style.css" />
<link rel="stylesheet" href="./styles/mainstyle.css" />
<link rel="stylesheet" href="./styles/default.style.css">
<link rel="stylesheet" href="./styles/index.style.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<script defer src="./js/edge.js"></script>
<script defer src="./js/box.js"></script>
<script defer src="./js/board.js"></script>
<script defer src="./js/game.js"></script>
<script defer src="./js/validation.js"></script>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./assets/favicon.ico" type="image/x-icon" />
<!-- JavaScript files -->
<script defer src="./js/index.js"></script>
<!-- Logo of the game -->
<link rel="icon" href="favicon.ico?" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico?" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
con" href="./favicon.ico" type="image/x-icon">
<script src="emoji.js"></script>
<script src="./js/emoji.js"></script>
<title>Dots & Boxes Game</title>
<style>
.sticky-button {
Expand Down Expand Up @@ -343,11 +342,11 @@

<body>
<audio id="background-music" autoplay loop>
<source src="sounds/bgMusic.mp3" type="audio/mpeg">
<source src="./assets/sounds/bgMusic.mp3" type="audio/mpeg">
</audio>
<div class="settings">
<video autoplay muted class="video" loop id="myVideo">
<source src="./assets/default.mp4" type="video/mp4" />
<source src="./assets/videos/default.mp4" type="video/mp4" />
</video>
<div class="whole-background">
<nav class="navbarr">
Expand All @@ -356,10 +355,10 @@
</div>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="./about.html">About Us</a></li>
<li><a href="FAQs.html">FAQs</a></li>
<li><a href="./contributors.html">Contributors</a></li>
<button><a href="./game.html">Let's Go</a></button>
<li><a href="./pages/about.html">About Us</a></li>
<li><a href="./pages/FAQs.html">FAQs</a></li>
<li><a href="./pages/contributors.html">Contributors</a></li>
<button><a href="./pages/game.html">Let's Go</a></button>
</ul>
<div class="hamburger ">
<i class="fas fa-bars"></i>
Expand All @@ -383,11 +382,11 @@ <h5>Feedback Form</h5>
<div class="content">
<div class="outer">
<div class="emojis">
<li class="slideImg"><img src="/assets/emoji-1.png" alt=""></li>
<li><img src="/assets/emoji-2.png" alt=""></li>
<li><img src="/assets/emoji-3.png" alt=""></li>
<li><img src="/assets/emoji-4.png" alt=""></li>
<li><img src="/assets/emoji-5.png" alt=""></li>
<li class="slideImg"><img src="./assets/images/emojis/emoji-1.png" alt=""></li>
<li><img src="./assets/images/emojis/emoji-2.png" alt=""></li>
<li><img src="./assets/images/emojis/emoji-3.png" alt=""></li>
<li><img src="./assets/images/emojis/emoji-4.png" alt=""></li>
<li><img src="./assets/images/emojis/emoji-5.png" alt=""></li>
</div>
</div>
<div class="stars">
Expand Down Expand Up @@ -434,7 +433,7 @@ <h3 class="instructions-heading">Instructions</h3>
3. Players will switch after every turn. But the player who has
filled the last box, will get one extra chance consecutively. <br />
</p>
<a href="./howtoplay.html" class="button">Read Detailed Instructions</a>
<a href="./pages/howtoplay.html" class="button">Read Detailed Instructions</a>
</div>
<div class="form">
<div class="right-background">
Expand Down Expand Up @@ -467,7 +466,7 @@ <h3 class="instructions-heading">Instructions</h3>

<div class="button-container">

<a href="./game.html" target="_blank" class="start-btn button1" id="start-btn" aria-label="START">
<a href="./pages/game.html" target="_blank" class="start-btn button1" id="start-btn" aria-label="START">
START
</a>
<button class="reset-btn button1" id="reset-btn">RESET</button>
Expand All @@ -478,9 +477,9 @@ <h3 class="instructions-heading">Instructions</h3>
</div>
<div class="author">
<div class="fotbar">
<a href="howtoplay.html">HowToPlay?</a>
<a href="termsofservice.html">TermsOfService</a>
<a href="privacypolicy.html">PrivacyPolicy</a>
<a href="./pages/howtoplay.html">HowToPlay?</a>
<a href="./pages/termsofservice.html">TermsOfService</a>
<a href="./pages/privacypolicy.html">PrivacyPolicy</a>
</div>
<p>
Created with ❤️ by <a href="https://github.com/ChromeGaming">Chrome Gaming</a>
Expand All @@ -496,7 +495,7 @@ <h3 class="instructions-heading">Instructions</h3>
<div class="score">
<div class="players"></div>
<video autoplay muted class="video" loop id="myVideo2">
<source src="./assets/default.mp4" type="video/mp4" />
<source src="./assets/videos/default.mp4" type="video/mp4" />
</video>
<div class="player-turn">
<div class="bg"><span class="name">PlayerX</span>'s turn</div>
Expand Down
16 changes: 8 additions & 8 deletions script.js → js/FAQs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,46 @@ drop.addEventListener('click', function(){
toggle= !toggle;
if(toggle)
{
img.src="assets/images/icon-plus.svg";
img.src="../assets/images/icon-plus.svg";
}
else
{
img.src="assets/images/icon-minus.svg"
img.src="../assets/images/icon-minus.svg"
}
})

drop2.addEventListener('click', function(){
toggle= !toggle;
if(toggle)
{
img2.src="assets/images/icon-plus.svg";
img2.src="../assets/images/icon-plus.svg";
}
else
{
img2.src="assets/images/icon-minus.svg"
img2.src="../assets/images/icon-minus.svg"
}
})

drop3.addEventListener('click', function(){
toggle= !toggle;
if(toggle)
{
img3.src="assets/images/icon-plus.svg";
img3.src="../assets/images/icon-plus.svg";
}
else
{
img3.src="assets/images/icon-minus.svg"
img3.src="../assets/images/icon-minus.svg"
}
})

drop4.addEventListener('click', function(){
toggle= !toggle;
if(toggle)
{
img4.src="assets/images/icon-plus.svg";
img4.src="../assets/images/icon-plus.svg";
}
else
{
img4.src="assets/images/icon-minus.svg"
img4.src="../assets/images/icon-minus.svg"
}
})
4 changes: 2 additions & 2 deletions js/board.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Board {
//
addEdgeClickEventListener() {
this.uiRoot.addEventListener("click", (e) => {
let click = new Audio('./sounds/click.mp3');
let click = new Audio('../assets/sounds/click.mp3');
click.play();
if (!this.isFillingAdjacentBoxes) {
if (e.target.classList.contains("edge")) {
Expand Down Expand Up @@ -191,7 +191,7 @@ class Board {
}

fillBoxes() {
let fill = new Audio('./sounds/fill.mp3');
let fill = new Audio('../assets/sounds/fill.mp3');
fill.play();
if (this.adjacentBoxesToFill.length != 0) {
setTimeout(() => {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion js/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Game {
const rowsInput = Number(localStorage.getItem("rows"));
const columnsInput = Number(localStorage.getItem("columns"));
const playersInput = Number(localStorage.getItem("players"));
const bgMusic = new Audio('./sounds/bgMusic.mp3');
const bgMusic = new Audio('../assets/sounds/bgMusic.mp3');
var game = null

document.addEventListener("DOMContentLoaded", () => {
Expand Down
2 changes: 1 addition & 1 deletion game.js → js/maingame.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Game {
this.isGameover = true

bgMusic.pause();
let winSound = new Audio('./sounds/win.mp3');
let winSound = new Audio('../assets/sounds/win.mp3');
winSound.play();

const player = this.players.reduce((prev, current) => {
Expand Down
6 changes: 3 additions & 3 deletions 404.html → pages/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404:Page not found</title>
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../assets/favicon.ico" type="image/x-icon">
</head>
<style>
body{
Expand Down Expand Up @@ -60,8 +60,8 @@
</style>
<body>
<div class="center">
<img src="img/404pic.png" alt="404 pic" class="pic">
<button class="btn"><a href="index.html">Home</a></button>
<img src="../assets/images/404pic.png" alt="404 pic" class="pic">
<button class="btn"><a href="../index.html">Home</a></button>
</div>
</body>
</html>
22 changes: 11 additions & 11 deletions FAQs.html → pages/FAQs.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->

<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png">
<link rel="stylesheet" href="FAQs.css">
<link rel="icon" href="../assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="../styles/FAQs.css">
<title>FAQs</title>


Expand All @@ -20,18 +20,18 @@

<div class="bottom-background">
<video autoplay muted loop >
<source src="assets/FAQ.mp4">
<source src="../assets/videos/FAQ.mp4">
</video>
</div>
<!-- Your existing content -->

<!--<img class="background" src="assets/images/background-pattern-desktop.svg">-->
<div class="faqcontainer">
<h1><img src="assets/images/icon-star.svg">FAQs</h1>
<h1><img src="../assets/images/icon-star.svg">FAQs</h1>

<div class="question">
<details>
<summary class = "drop"><img src="assets/images/icon-plus.svg" class = "images"> How do I win the game?
<summary class = "drop"><img src="../assets/images/icon-plus.svg" class = "images"> How do I win the game?
</summary>
<p>The objective is to capture more boxes than your opponent. Each box you complete by drawing lines between adjacent dots scores you a point. The player with the most points when all boxes are claimed wins the game.
</p>
Expand All @@ -40,7 +40,7 @@ <h1><img src="assets/images/icon-star.svg">FAQs</h1>

<div class="question">
<details>
<summary class = "drop2"><img src="assets/images/icon-plus.svg" class = "images2">How do I set up the game?
<summary class = "drop2"><img src="../assets/images/icon-plus.svg" class = "images2">How do I set up the game?
</summary>
<p>Choose your desired grid size to customize the game's difficulty. Start by connecting the dots on the grid, taking turns with your opponent.
</p>
Expand All @@ -49,7 +49,7 @@ <h1><img src="assets/images/icon-star.svg">FAQs</h1>

<div class="question">
<details>
<summary class = "drop3"><img src="assets/images/icon-plus.svg" class = "images3">What happens if I complete a box?
<summary class = "drop3"><img src="../assets/images/icon-plus.svg" class = "images3">What happens if I complete a box?
</summary>
<p>Completing a box by drawing its final line scores you a point and grants you an extra turn. This strategic element adds depth to gameplay.

Expand All @@ -59,15 +59,15 @@ <h1><img src="assets/images/icon-star.svg">FAQs</h1>

<div class="question">
<details>
<summary class = "drop4"><img src="assets/images/icon-plus.svg" class = "images4">When does the game end?
<summary class = "drop4"><img src="../assets/images/icon-plus.svg" class = "images4">When does the game end?
</summary>
<p>The game ends when all boxes on the grid have been claimed by drawing lines. At this point, the player with the highest score, based on the number of boxes captured, wins.
</p>
</details>
</div>
<div class="question">
<details>
<summary class = "drop5"><img src="assets/images/icon-plus.svg" class = "images5">Is there a strategy involved in playing this game?
<summary class = "drop5"><img src="../assets/images/icon-plus.svg" class = "images5">Is there a strategy involved in playing this game?

</summary>
<p>Yes, strategic line selection is crucial. Thinking ahead to maximize the number of boxes you can capture while preventing your opponent from doing the same is key to winning.
Expand All @@ -77,7 +77,7 @@ <h1><img src="assets/images/icon-star.svg">FAQs</h1>
</div>
<div class="question">
<details>
<summary class = "drop6"><img src="assets/images/icon-plus.svg" class = "images6">What if I need help or have more questions about gameplay?
<summary class = "drop6"><img src="../assets/images/icon-plus.svg" class = "images6">What if I need help or have more questions about gameplay?

</summary>
<p>If you have any more questions or need assistance with the rules, feel free to refer to the instructions or ask your opponent for clarification.You can also add suggestions in Feedback Form.Enjoy the game!
Expand All @@ -88,7 +88,7 @@ <h1><img src="assets/images/icon-star.svg">FAQs</h1>



<script src="script.js"></script>
<script src="../js/FAQs.js"></script>

</body>
</html>
14 changes: 7 additions & 7 deletions about.html → pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Us</title>
<link rel="stylesheet" href="about.css">
<link rel="stylesheet" href="../styles/about.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet">
Expand All @@ -16,14 +16,14 @@
<body>
<nav class="navbar">
<div class="logo">
<a href="index.html">Dots & Boxes ⚄</a>
<a href="../index.html">Dots & Boxes ⚄</a>
</div>
<ul class="navlinks">
<li><a href="index.html">Home</a></li>
<li><a href="./about.html">About Us</a></li>
<li><a href="FAQs.html">FAQs</a></li>
<li><a href="./contributors.html">Contributors</a></li>
<li><a href="index.html">Let's Go</a></li>
<li><a href="../index.html">Home</a></li>
<li><a href="../pages/about.html">About Us</a></li>
<li><a href="../pages/FAQs.html">FAQs</a></li>
<li><a href="../pages/contributors.html">Contributors</a></li>
<li><a href="../pages/game.html">Let's Go</a></li>
</ul>
<div class="hamburger ">
<i class="fas fa-bars"></i>
Expand Down
Loading

0 comments on commit 8591dc8

Please sign in to comment.