Skip to content

Commit

Permalink
Add project brief files
Browse files Browse the repository at this point in the history
* Add `brief/project.txt` with project goal description
* Add `brief/chess_rules.txt` with concise chess rules
* Add `brief/iteration_1.txt` with first iteration goal
  • Loading branch information
andreisavu committed Aug 22, 2024
1 parent e00d4fa commit b52a26b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions brief/chess_rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Chess Rules

## Objective
The objective of chess is to checkmate your opponent's king. This means the king is in a position to be captured (in check) and there is no way to move the king out of capture (mate).

## The Board
Chess is played on an 8x8 grid, with alternating light and dark squares. Each player starts with 16 pieces: 1 king, 1 queen, 2 rooks, 2 knights, 2 bishops, and 8 pawns.

## The Pieces
- **King**: Moves one square in any direction. The king cannot move into check.
- **Queen**: Moves any number of squares in any direction.
- **Rook**: Moves any number of squares horizontally or vertically.
- **Bishop**: Moves any number of squares diagonally.
- **Knight**: Moves in an L-shape: two squares in one direction and then one square perpendicular.
- **Pawn**: Moves forward one square, with the option to move two squares on its first move. Pawns capture diagonally.

## Special Moves
- **Castling**: A move involving the king and either rook. The king moves two squares towards a rook, and the rook moves to the square next to the king. Castling can only occur if neither piece has moved before, there are no pieces between them, and the king is not in check.
- **En Passant**: A special pawn capture. If a pawn moves two squares forward from its starting position and lands beside an opponent's pawn, the opponent's pawn can capture it as if it had moved only one square forward.
- **Promotion**: When a pawn reaches the opposite side of the board, it is promoted to any other piece (except a king), usually a queen.

## End of the Game
- **Checkmate**: The king is in check and cannot escape.
- **Stalemate**: The player to move has no legal moves and is not in check. The game is a draw.
- **Draw**: The game can also end in a draw by agreement, insufficient material to checkmate, threefold repetition, or the fifty-move rule.
1 change: 1 addition & 0 deletions brief/iteration_1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
For the first iteration, the goal is to build a UCI interface compatible chess program that makes legal moves and can plan a game end to end. Winning is not a goal.
1 change: 1 addition & 0 deletions brief/project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The goal of the project is to build a working implementation of a chess program using only functions from the standard library in Python. The project should be executed in an iterative approach.

0 comments on commit b52a26b

Please sign in to comment.