Skip to content

Commit

Permalink
Merge pull request #170 from Mehul237/new_branch
Browse files Browse the repository at this point in the history
Chess game
  • Loading branch information
shrey141102 authored Dec 24, 2023
2 parents ade2e12 + 1c1f660 commit 4c75eef
Show file tree
Hide file tree
Showing 17 changed files with 807 additions and 0 deletions.
Binary file added Chess game/Bbishop.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/Bking.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/Bknight.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/Bpawn.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/Bqueen.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/Brook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions Chess game/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Chess Game Explanation

## Introduction
Chess is a classic two-player strategy board game that involves moving pieces on an 8x8 grid. Each player starts with 16 pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns.

## Objective
The goal of chess is to checkmate your opponent's king, which means putting the king in a position where it is under attack and cannot escape capture.

## The Board

The chess board consists of 64 squares, alternately light and dark. Players sit facing each other with the board placed between them.

## The Pieces
1. **King:** Moves one square in any direction.
2. **Queen:** Moves diagonally, horizontally, or vertically any number of squares.
3. **Rook:** Moves horizontally or vertically any number of squares.
4. **Knight:** Moves in an "L" shape, two squares in one direction and then one square perpendicular.
5. **Bishop:** Moves diagonally any number of squares.
6. **Pawn:** Moves forward one square, captures diagonally. On its first move, a pawn can advance two squares.


## Gameplay
Players take turns to make a move. Each turn consists of moving one of your pieces according to its rules. The game continues until one player achieves checkmate or a draw is declared.

## Special Moves
1. **Castling:** A king moves two squares towards a rook, and the rook moves to the square the king crossed.
2. **En Passant:** A pawn capturing option that occurs when a pawn moves two squares forward from its starting position, and an opponent's pawn could have captured it had it moved only one square.

## Conclusion
Chess is a game of skill, strategy, and foresight. It requires planning several moves ahead and understanding the strengths and weaknesses of each piece.

Enjoy your game of chess!
Binary file added Chess game/Wbishop.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/Wking.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/Wknight.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/Wpawn.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/Wqueen.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/Wrook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions Chess game/chess.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
* {
margin: 0;
padding: 0;
}

body {
display: grid;
place-items: center;
overflow-x: hidden;
}

h1 {
margin: 10px;
}

ul {
display: grid;
grid-template-columns: 1fr;
}

.divv {
display: flex;
}

li {
list-style: none;
display: grid;
place-items: center;
font-size: 0px;
}

.box {
margin: .5px;
width: 75px;
height: 75px;
}

#tog {
margin: 10px 0px;
}


.allimg {
width: 45px;
position: relative;
bottom: 5px;
}

.allpawn {
transform: scale(.7);
}

.authcont {
width: 100vw;
}

.author {
float: right;
margin-right: 50px;

}


@media (max-width:650px){

#tog {
margin-bottom: 70px;

}

.box {
width: 11vw;
height: 11vw;
}

.allimg {
width: 7vw;
}
}
Loading

0 comments on commit 4c75eef

Please sign in to comment.