Skip to content

Commit

Permalink
Merge pull request Sulagna-Dutta-Roy#551 from Sambit-Mondal/ChessGame
Browse files Browse the repository at this point in the history
Fixes Sulagna-Dutta-Roy#331 : Chess Game
  • Loading branch information
Sulagna-Dutta-Roy authored May 30, 2024
2 parents f23b25a + 76edd2c commit 97c4f5b
Show file tree
Hide file tree
Showing 18 changed files with 2,088 additions and 0 deletions.
Binary file added Chess Game/assets/blacks/Black-Bishop.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 Chess Game/assets/blacks/Black-King.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 Chess Game/assets/blacks/Black-Knight.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 Chess Game/assets/blacks/Black-Pawn.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 Chess Game/assets/blacks/Black-Queen.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 Chess Game/assets/blacks/Black-Rook.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 Chess Game/assets/whites/White-Bishop.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 Chess Game/assets/whites/White-King.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 Chess Game/assets/whites/White-Knight.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 Chess Game/assets/whites/White-Pawn.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 Chess Game/assets/whites/White-Queen.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 Chess Game/assets/whites/White-Rook.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 Chess Game/game-28-128.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 Chess Game/game-28-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
301 changes: 301 additions & 0 deletions Chess Game/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
<!DOCTYPE html>
<html>

<head>
<title>Chess Board</title>
<link rel="stylesheet" href="src/style.css">
</head>

<body>

<div class="container">
<div class="buttonContainer">
<div>
<div id="levelLabel">
<span>Level:</span>
</div>

<select id="level">
<option value="1">Level 1</option>
<option value="2">Level 2</option>
<option value="3">Level 3</option>
<option value="4">Level 4</option>
<option value="5">Level 5</option>
<option value="6">Level 6</option>
<option value="7">Level 7</option>
<option value="8">Level 8</option>
<option value="9">Level 9</option>
<option value="10">Level 10</option>
</select>
</div>
<div>
<button id="newGame">New Game</button>
</div>
<div>
<button id="switchSides">Switch Sides</button>
</div>
</div>


<div class="chessBoard">
<!-- Add the pawn div element -->
<div class="square white">
<div class="piece rook" color="black">
<img src="assets/blacks/Black-Rook.png" alt="Rook">
</div>
</div>
<div class="square black">
<div class="piece knight" color="black">
<img src="assets/blacks/Black-Knight.png" alt="pawn">
</div>
</div>
<div class="square white">
<div class="piece bishop" color="black">
<img src="assets/blacks/Black-Bishop.png" alt="pawn">
</div>
</div>
<div class="square black">
<div class="piece queen" color="black">
<img src="assets/blacks/Black-Queen.png" alt="Queen">
</div>
</div>
<div class="square white">
<div class="piece king" color="black">
<img src="assets/blacks/Black-King.png" alt="King">
</div>
</div>
<div class="square black">
<div class="piece bishop" color="black">
<img src="assets/blacks/Black-Bishop.png" alt="Bishop">
</div>
</div>
<div class="square white">
<div class="piece knight" color="black">
<img src="assets/blacks/Black-Knight.png" alt="Knight">
</div>
</div>
<div class="square black">
<div class="coordinate rank whiteText">8</div>

<div class="piece rook" color="black">
<img src="assets/blacks/Black-Rook.png" alt="Rook">
</div>
</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square black">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square white">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square black">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square white">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square black">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square white">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square black">
<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<div class="square white">
<div class="coordinate rank blackText">7</div>

<div class="piece pawn" color="black">
<img src="assets/blacks/Black-Pawn.png" alt="pawn">
</div>

</div>
<!-- ------------------------------------------------------------------------- -->
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black">
<div class="coordinate rank whiteText">6</div>

</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white">
<div class="coordinate rank blackText">5</div>

</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black">
<div class="coordinate rank whiteText">4</div>

</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white"></div>
<div class="square black"></div>
<div class="square white">
<div class="coordinate rank blackText">3</div>
</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square white">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square black">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square white">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square black">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square white">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square black">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square white">
<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<div class="square black">
<div class="coordinate rank whiteText">2</div>

<div class="piece pawn" color="white">
<img src="assets/whites/White-Pawn.png" alt="pawn">
</div>
</div>
<!-- ------------------------------------------------------------------------- -->

<div class="square black">
<div class="coordinate whiteText">a</div>

<div class="piece rook" color="white">
<img src="assets/whites/White-Rook.png" alt="Rook">
</div>
</div>
<div class="square white">
<div class="coordinate blackText">b</div>

<div class="piece knight" color="white">
<img src="assets/whites/White-Knight.png" alt="Knight">
</div>
</div>
<div class="square black">
<div class="coordinate whiteText">c</div>

<div class="piece bishop" color="white">
<img src="assets/whites/White-Bishop.png" alt="Bishop">
</div>
</div>
<div class="square white">
<div class="coordinate blackText">d</div>

<div class="piece queen" color="white">
<img src="assets/whites/White-Queen.png" alt="Queen">
</div>
</div>
<div class="square black">
<div class="coordinate whiteText">e</div>

<div class="piece king" color="white">
<img src="assets/whites/White-King.png" alt="King">
</div>
</div>
<div class="square white">
<div class="coordinate blackText">f</div>
<div class="piece bishop" color="white">
<img src="assets/whites/White-Bishop.png" alt="Bishop">
</div>
</div>
<div class="square black">
<div class="coordinate whiteText">g</div>

<div class="piece knight" color="white">
<img src="assets/whites/White-Knight.png" alt="Knight">
</div>
</div>
<div class="square white">
<div class="coordinate rank blackText">1</div>
<div class="coordinate blackText">h</div>
<div class="piece rook" color="white">
<img src="assets/whites/White-Rook.png" alt="Rook">
</div>
</div>
<div id="alert">
Draw
</div>
</div>

</div>





<script src="scripts/script.js"></script>
</body>

</html>
30 changes: 30 additions & 0 deletions Chess Game/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"manifest_version": 3,
"name": "Chess Game Extension JS",
"version": "1.0",
"description": "Chess game extension built in pure HTML CSS JS...",
"author": "[email protected]",
"icons": {
"48": "game-28-48.png",
"128": "game-28-128.png"
},
"permissions": [
"storage"
],
"optional-permissions": [
"tabs"
],
"action": {
"default_popup": "index.html"
},
"web_accessible_resources": [
{
"resources": [
"index.html"
],
"matches": [
"<all_urls>"
]
}
]
}
Loading

0 comments on commit 97c4f5b

Please sign in to comment.