Select your next move! white to move
A | B | C | D | E | F | G | H | ||
---|---|---|---|---|---|---|---|---|---|
8 | ![]() |
8 | |||||||
7 | ![]() |
![]() |
7 | ||||||
6 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
6 | |
5 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
5 | ||
4 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
4 |
3 | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3 |
2 | ![]() |
2 | |||||||
1 | ![]() |
1 | |||||||
A | B | C | D | E | F | G | H |
It's your turn to move! Choose one from the following table
FROM | TO (Just click a link!) |
---|---|
A2 | A3, A4 |
B1 | A3, C3, D2 |
B2 | B3, B4 |
C1 | D2, E3, F4, G5, H6 |
C2 | C3, C4 |
D5 | D6 |
E1 | D1, D2 |
E2 | E3, E4 |
F2 | F3, F4 |
G1 | F3, H3 |
G2 | G3, G4 |
H2 | H3, H4 |
Last 5 moves in this game
Move | Author |
---|---|
B7 to A6 |
@GaslightGod |
D3 to A6 |
@TheHighNoonCowboy |
C6 to C5 |
@GaslightGod |
D4 to D5 |
@TheHighNoonCowboy |
B8 to A6 |
@GaslightGod |
Top 10 most moves across all games
Total moves | User |
---|---|
4 | @TheHighNoonCowboy |
4 | @GaslightGod |
This repository contains a Python script that automates chess games through GitHub issues. Users can make moves and start new games by creating specific issues, and the script processes these actions accordingly.
To start a new chess game, follow these steps:
-
Create an Issue:
- Title: "Chess: Start New Game"
-
Validation:
- Only the repository owner can initiate a new game.
-
Outcome:
- If the initiation is successful, the script creates a new game instance.
- The README.md file is dynamically updated to reflect the new game's state.
-
Error Handling:
- If a game is already in progress and a non-owner attempts to start a new game, an error is communicated, and the issue is closed.
-
Last Moves Update:
- The last moves file is updated to reflect the start of the new game.
-
Game Headers:
- Event details, site information, date, and round are set in the game headers.
-
Readme Update:
- The README.md file is dynamically updated to display the initial state of the chess board, moves list, and other relevant information.
To make a move in the chess game, follow these steps:
-
Create an Issue:
- Title: "Chess: Move [source] to [destination]"
- Replace
[source]
and[destination]
with the respective chess coordinates (e.g., "Chess: Move E2 to E4").
-
Validation:
- The script validates the move, ensuring it adheres to standard chess rules.
- Checks are performed for consecutive moves, invalid positions, and other game conditions.
-
Outcome:
- If the move is valid, the script updates the game board and provides feedback in the issue.
- Labels indicating capture and player turn are applied.
- Top moves and last moves statistics are updated.
-
Readme Update:
- The README.md file is dynamically updated to reflect the current state of the chess board, moves list, and other relevant information.
-
Alternatively:
- You can select the move you would like to make from the corresponding dropdown of valid moves!
The chess game can conclude with various outcomes, and the script handles the conclusion as follows:
-
End Conditions:
- The game can end in a draw, white win, or black win based on standard chess rules.
-
Summary:
- Upon game completion, the script archives the current game.
- A summary comment is added to the issue, indicating the outcome and providing details on the players involved.
-
Labeling:
- Labels are applied to the issue to denote the result, such as "Draw!" or "Winner!"
-
Cleanup:
- The current game is archived, and the last moves file is removed.
-
Readme Update:
- The README.md file is dynamically updated to reflect the final state of the chess board, moves list, and other relevant information.
- python-chess: A Python chess library for chess move generation and validation.
- PyYAML: A YAML parser and emitter for Python.