From ee354fe80acadc0a8df5c34ed916b895fa10fb12 Mon Sep 17 00:00:00 2001 From: amanjain1644 Date: Fri, 12 Jul 2024 13:07:51 +0530 Subject: pawn move added --- .vscode/settings.json | 3 +++ app.js | 14 ++++++++++++++ index.css | 27 ++++++++++++++++++++------- index.html | 13 +++++++++++++ pawns_move.js | 7 +++++++ 5 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 pawns_move.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/app.js b/app.js index ebf0afc..7437c72 100644 --- a/app.js +++ b/app.js @@ -1,17 +1,31 @@ let board = [ +<<<<<<< Updated upstream [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], +======= + [0, 1, 0, 0, 0, 0, 0, 0], + [1, 1, 0, 0, 0, 0, 0, 0], + [0, 0, 1, 1, 1, 0, 0, 0], + [0, 0, 1, 2, 1, 0, 0, 0], + [0, 0, 1, 1, 1, 0, 0, 0], +>>>>>>> Stashed changes [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], ] +<<<<<<< Updated upstream console.log(amelia_move(board, 7, 7)) +======= +console.log(board.length) + +console.log(amelia_move(board, 0,0)) +>>>>>>> Stashed changes function pawn_move(board, y, x) { let moves = [] diff --git a/index.css b/index.css index 271e489..f9e40ae 100644 --- a/index.css +++ b/index.css @@ -1,13 +1,25 @@ +*{ + font-size: 30px; + margin: 0; + padding: 0; +} + .white{ background-color: antiquewhite; - height: 100px; - width: 100px; + height: 76px; + width: 76px; + display: flex; + justify-content: center; + align-items: center; } .black{ - height: 100px; - width: 100px; - background-color: brown; + height: 76px; + width: 76px; + background-color: brown; + display: flex; + justify-content: center; + align-items: center; } body{ @@ -16,11 +28,12 @@ body{ display: flex; justify-content: center; align-items: center; + margin: 1px; } .chess-board{ - width: 800px; - height: 800px; + width: 608px; + height: 608px; display: grid; grid-template-columns:repeat(8,1fr); grid-template-rows:repeat(8,1fr); diff --git a/index.html b/index.html index 1ea90b2..28b1362 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,20 @@
+<<<<<<< Updated upstream
+======= +
R
+
P
+
+
+
+
+
+
R
+
+
+>>>>>>> Stashed changes
diff --git a/pawns_move.js b/pawns_move.js new file mode 100644 index 0000000..f304608 --- /dev/null +++ b/pawns_move.js @@ -0,0 +1,7 @@ +function pawn_move(board, y, x){ + let moves =[]; + // * if pawn at row 1 or at row 6 it has to choice + if(x-1 && y-1){ + moves.push() + } +} \ No newline at end of file -- cgit v1.2.3 From 5460f45a33c8cfd423e3d84c6bf082f7a55dc4e7 Mon Sep 17 00:00:00 2001 From: amanjain1644 Date: Fri, 12 Jul 2024 13:20:09 +0530 Subject: applied changeds --- app.js | 1 + index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/app.js b/app.js index 7437c72..5085dd6 100644 --- a/app.js +++ b/app.js @@ -10,6 +10,7 @@ let board = [ ======= [0, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0], + [1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 2, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], diff --git a/index.html b/index.html index 28b1362..8398804 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,7 @@
R
+
R
>>>>>>> Stashed changes -- cgit v1.2.3 From bb1ce7fe68a374f60b5cf85db318478f57beb0b9 Mon Sep 17 00:00:00 2001 From: amanjain1644 Date: Fri, 12 Jul 2024 15:15:13 +0530 Subject: modified the chess board --- app.js | 12 ----- index.css | 35 ++++++++----- index.html | 175 +++++++++++++++++++++++++++++++++---------------------------- 3 files changed, 117 insertions(+), 105 deletions(-) diff --git a/app.js b/app.js index 5085dd6..8e41b32 100644 --- a/app.js +++ b/app.js @@ -1,32 +1,20 @@ let board = [ -<<<<<<< Updated upstream - [0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0], -======= [0, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 2, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], ->>>>>>> Stashed changes [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], ] -<<<<<<< Updated upstream -console.log(amelia_move(board, 7, 7)) -======= console.log(board.length) console.log(amelia_move(board, 0,0)) ->>>>>>> Stashed changes function pawn_move(board, y, x) { let moves = [] diff --git a/index.css b/index.css index f9e40ae..08324aa 100644 --- a/index.css +++ b/index.css @@ -1,25 +1,32 @@ *{ - font-size: 30px; margin: 0; padding: 0; } -.white{ - background-color: antiquewhite; +.box{ height: 76px; - width: 76px; - display: flex; - justify-content: center; - align-items: center; + width: 76px; + position: relative; +} +.top-corner{ + padding: 1px; + position: absolute; +} +.bottom-corner{ + padding: 1px; + position: absolute; + bottom: 2px; + right: 2px; } -.black{ - height: 76px; - width: 76px; - background-color: brown; - display: flex; - justify-content: center; - align-items: center; +.white{ + background-color: #eaead2; + color: #4b7299; +} + +.black{ + background-color: #4b7299; + color: #eaead2; } body{ diff --git a/index.html b/index.html index 8398804..8954901 100644 --- a/index.html +++ b/index.html @@ -10,100 +10,117 @@
-<<<<<<< Updated upstream -
-======= -
R
-
P
-
-
-
-
-
-
R
-
R
+
+
8
+
+
+
7
+
+
+
6
+
+
+
5
+
+
+
4
+
+
+
3
+
+
+
2
+
+
+
1
+
a
+
->>>>>>> Stashed changes -
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
b
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
c
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
d
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
e
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
f
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
g
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
h
+
-
-
-
-
-
-
-
-
-
-
-
+
-- cgit v1.2.3