diff --git a/README.md b/README.md
index e1b7820..2f8903b 100644
--- a/README.md
+++ b/README.md
@@ -18,11 +18,14 @@ Play: [https://chessmaker.azurewebsites.net](https://chessmaker.azurewebsites.ne
ChessMaker is a Python (3.11+) chess implementation that can be extended to support any custom rule or feature.
It allows you to build almost any variant you can think of easily and quickly.
-ChessMaker isn't tied to any GUI, but comes with a thin, [pywebio](https://pywebio.readthedocs.io/en/latest/), multiplayer web interface.
-
It was inspired by [r/AnarchyChess](https://www.reddit.com/r/AnarchyChess/) - and the packaged optional rules are almost all inspired by that subreddit.
-These rules are:
+ChessMaker isn't tied to any GUI, but comes with a thin, [pywebio](https://pywebio.readthedocs.io/en/latest/), multiplayer web interface.
+The web interface supports choosing from the packaged rules, singleplayer (vs Yourself), and multiplayer
+(vs a friend or random opponent). It also supports saving and loading games - which can be shared with others
+and be used as puzzles.
+
+The packaged rules are:
* Chess960
* Knooks
@@ -37,16 +40,17 @@ These rules are:
* Vertical Castling
* Double Check to Win
* Capture All Pieces to Win
+* Duck Chess
+Contributions of new variants or anything else you'd like to see in the project are welcome!
## What ChessMaker isn't
-* A complete chess server - It doesn't support users, matchmaking, ratings, cheating detection, etc.
-The frontend is very simple and not the focus of the project.
-* A chess engine. The design choices are not optimized for speed, and it doesn't provide any analysis or AI.
-* A compliant or standard chess implementation. It doesn't support UCI or existing chess GUIs,
+* A complete chess server - It currently doesn't support users, matchmaking, ratings, cheating detection,
+and is very thin. The frontend is very simple and currently not the focus of the project.
+* A chess engine - The design choices are not optimized for speed, and it doesn't provide any analysis or AI.
+* A compliant or standard chess implementation - It doesn't support UCI or existing chess GUIs,
because it allows rules that wouldn't be possible with those.
-Note: While ChessMaker isn't a chess server, one could be built on top of it, and development of alternative clients to it is welcomed and encouraged.
-
-
+-Note: While ChessMaker isn't a chess server, one could be built on top of it, and development of alternative clients to it is welcomed and encouraged.
+If this project gets enough interest, a more complete server might be added.
diff --git a/chessmaker/chess/base/board.py b/chessmaker/chess/base/board.py
index 77ffa73..df1f068 100644
--- a/chessmaker/chess/base/board.py
+++ b/chessmaker/chess/base/board.py
@@ -107,6 +107,7 @@ def _on_after_move(self, _: AfterMoveEvent):
before_turn_change_event = BeforeTurnChangeEvent(self, next_player)
self.publish(before_turn_change_event)
if before_turn_change_event.cancelled:
+ self.turn_iterator = itertools.chain([next_player], self.turn_iterator)
return
self.current_player = before_turn_change_event.next_player
self.publish(AfterTurnChangeEvent(self, self.current_player))
diff --git a/chessmaker/chess/base/piece.py b/chessmaker/chess/base/piece.py
index 8f36c66..58c85fa 100644
--- a/chessmaker/chess/base/piece.py
+++ b/chessmaker/chess/base/piece.py
@@ -50,7 +50,7 @@ class BeforeCapturedEvent(AfterCapturedEvent):
class Piece(Cloneable, EventPublisher):
def __init__(self, player: Player):
super().__init__()
- self._player = player
+ self.player = player
self._board: Board = None
def __repr__(self):
@@ -92,10 +92,6 @@ def move(self, move_option: MoveOption):
def on_join_board(self):
pass
- @property
- def player(self):
- return self._player
-
@property
def position(self):
return self.board._get_piece_position(self)
diff --git a/chessmaker/chess/game_factory.py b/chessmaker/chess/game_factory.py
index dd71113..5e30e05 100644
--- a/chessmaker/chess/game_factory.py
+++ b/chessmaker/chess/game_factory.py
@@ -9,6 +9,7 @@
from chessmaker.chess.base.player import Player
from chessmaker.chess.base.square import Square
from chessmaker.chess.pieces.bishop import Bishop
+from chessmaker.chess.pieces.duck import Duck
from chessmaker.chess.pieces.king import King
from chessmaker.chess.pieces.knight import Knight
from chessmaker.chess.pieces.knook.knookable_knight import KnookableKnight
@@ -16,9 +17,9 @@
from chessmaker.chess.pieces.pawn import Pawn
from chessmaker.chess.pieces.queen import Queen
from chessmaker.chess.pieces.rook import Rook
-from chessmaker.chess.results import stalemate, Repetition, NoCapturesOrPawnMoves, checkmate
+from chessmaker.chess.results import stalemate, Repetition, NoCapturesOrPawnMoves, checkmate, no_kings
from chessmaker.chess.rules import ForcedEnPassant, KnightBoosting, OmnipotentF6Pawn, SiberianSwipe, IlVaticano, \
- BetaDecay, KingCantMoveToC2, LaBastarda
+ BetaDecay, KingCantMoveToC2, LaBastarda, DuckChess
class A:
@@ -39,13 +40,15 @@ def create_game(
vertical_castling: bool = False,
double_check_to_win: bool = False,
capture_all_pieces_to_win: bool = False,
+ duck_chess: bool = False,
):
_knight = Knight
_rook = Rook
castling_directions = ((1, 0), (-1, 0))
if vertical_castling:
castling_directions = tuple(list(castling_directions) + [(0, 1), (0, -1)])
- _king = lambda player: King(player, attackable=capture_all_pieces_to_win, castling_directions=castling_directions)
+ attackable = capture_all_pieces_to_win or duck_chess
+ _king = lambda player: King(player, attackable=attackable, castling_directions=castling_directions)
if knooks:
_knight = KnookableKnight
_rook = KnookableRook
@@ -100,6 +103,7 @@ def _piece_row() -> list[Callable[[Player], Piece]]:
(omnipotent_f6_pawn, OmnipotentF6Pawn(pawn=_pawn)),
(la_bastarda, LaBastarda(pawn=_pawn)),
(beta_decay, BetaDecay([_rook, Bishop, _pawn])),
+ (duck_chess, DuckChess()),
]:
if enabled:
rules.append(rule)
@@ -108,7 +112,9 @@ def _piece_row() -> list[Callable[[Player], Piece]]:
if capture_all_pieces_to_win:
result_functions.insert(0, results.capture_all_pieces_to_win)
else:
- result_functions.insert(0, checkmate)
+ if not duck_chess:
+ result_functions.insert(0, checkmate)
+ result_functions.insert(0, no_kings)
if double_check_to_win:
result_functions.insert(0, results.double_check_to_win)
@@ -129,7 +135,7 @@ def __call__(self, board: Board):
[Square(piece_row[i](black)) for i in range(8)],
[Square(_pawn(black)) for _ in range(8)],
_empty_line(8),
- _empty_line(8),
+ _empty_line(7) + [Square(Duck(white) if duck_chess else None)],
_empty_line(8),
_empty_line(8),
[Square(_pawn(white)) for _ in range(8)],
diff --git a/chessmaker/chess/pieces/duck.py b/chessmaker/chess/pieces/duck.py
new file mode 100644
index 0000000..de47b35
--- /dev/null
+++ b/chessmaker/chess/pieces/duck.py
@@ -0,0 +1,34 @@
+from typing import Iterable
+
+from chessmaker.chess.base import Player
+from chessmaker.chess.base.move_option import MoveOption
+from chessmaker.chess.base.piece import Piece, BeforeGetMoveOptionsEvent
+from chessmaker.events import EventPriority
+
+
+class Duck(Piece):
+ def __init__(self, player: Player, movable: bool = False):
+ super().__init__(player)
+ self.movable = movable
+
+ @classmethod
+ @property
+ def name(cls):
+ return "Duck"
+
+ def on_join_board(self):
+ self.board.subscribe(BeforeGetMoveOptionsEvent, self._on_before_get_move_options, EventPriority.HIGH)
+
+ def _on_before_get_move_options(self, event: BeforeGetMoveOptionsEvent):
+ if self.movable:
+ if event.piece is not self:
+ event.set_move_options([])
+
+ def _get_move_options(self) -> Iterable[MoveOption]:
+ if self.movable:
+ for square in self.board:
+ if square.piece is None and square.position != self.position:
+ yield MoveOption(square.position)
+
+ def clone(self):
+ return Duck(self.player, movable=self.movable)
diff --git a/chessmaker/chess/results/__init__.py b/chessmaker/chess/results/__init__.py
index cf2c8f3..adfdf6e 100644
--- a/chessmaker/chess/results/__init__.py
+++ b/chessmaker/chess/results/__init__.py
@@ -1,4 +1,5 @@
from .standard_result import StandardResult
+from .no_kings import no_kings
from .checkmate import checkmate
from .stalemate import stalemate
from .repetition import Repetition
diff --git a/chessmaker/chess/results/checkmate.py b/chessmaker/chess/results/checkmate.py
index 493f09b..327d8c0 100644
--- a/chessmaker/chess/results/checkmate.py
+++ b/chessmaker/chess/results/checkmate.py
@@ -4,14 +4,8 @@
def checkmate(board: Board) -> str | None:
- is_stalemate = stalemate(board)
- if is_stalemate:
- current_player = board.current_player
- player_pieces = list(board.get_player_pieces(current_player))
-
- kings = [piece for piece in player_pieces if isinstance(piece, King)]
- if not kings or all(king.is_attacked() for king in kings):
- return f"Checkmate - {current_player.name} loses"
-
-
+ current_player = board.current_player
+ kings = [piece for piece in board.get_player_pieces(current_player) if isinstance(piece, King)]
+ if stalemate(board) and all(king.is_attacked() for king in kings):
+ return f"Checkmate - {current_player.name} loses"
diff --git a/chessmaker/chess/results/no_kings.py b/chessmaker/chess/results/no_kings.py
new file mode 100644
index 0000000..a8cbf0c
--- /dev/null
+++ b/chessmaker/chess/results/no_kings.py
@@ -0,0 +1,8 @@
+from chessmaker.chess.base import Board
+from chessmaker.chess.pieces import King
+
+
+def no_kings(board: Board) -> str | None:
+ for player in board.players:
+ if not [piece for piece in board.get_player_pieces(player) if isinstance(piece, King)]:
+ return f"No kings left - {player.name} loses"
diff --git a/chessmaker/chess/results/repetition.py b/chessmaker/chess/results/repetition.py
index 00429b9..a01413a 100644
--- a/chessmaker/chess/results/repetition.py
+++ b/chessmaker/chess/results/repetition.py
@@ -22,4 +22,4 @@ def __call__(self, board: Board) -> str | None:
self.positions[position_hash] = self.positions.get(position_hash, 0) + 1
if self.positions[position_hash] >= self.needed_repetitions:
- return "Repetition - Draw"
\ No newline at end of file
+ return "Repetition - Draw"
diff --git a/chessmaker/chess/results/standard_result.py b/chessmaker/chess/results/standard_result.py
index c398207..3cc0cac 100644
--- a/chessmaker/chess/results/standard_result.py
+++ b/chessmaker/chess/results/standard_result.py
@@ -1,4 +1,5 @@
from chessmaker.chess.base.board import Board
+from chessmaker.chess.results import no_kings
from chessmaker.chess.results.checkmate import checkmate
from chessmaker.chess.results.no_captures_or_pawn_moves import NoCapturesOrPawnMoves
from chessmaker.chess.results.repetition import Repetition
@@ -8,6 +9,7 @@
class StandardResult:
def __init__(self):
self.results = [
+ no_kings,
checkmate,
stalemate,
Repetition(),
diff --git a/chessmaker/chess/rules/__init__.py b/chessmaker/chess/rules/__init__.py
index ca92121..f6f3e2a 100644
--- a/chessmaker/chess/rules/__init__.py
+++ b/chessmaker/chess/rules/__init__.py
@@ -5,4 +5,5 @@
from .omnipotent_f6_pawn import OmnipotentF6Pawn
from .siberian_swipe import SiberianSwipe
from .king_cant_move_to_c2 import KingCantMoveToC2
-from .la_bastarda import LaBastarda
\ No newline at end of file
+from .la_bastarda import LaBastarda
+from .duck_chess import DuckChess
diff --git a/chessmaker/chess/rules/duck_chess.py b/chessmaker/chess/rules/duck_chess.py
new file mode 100644
index 0000000..6917f05
--- /dev/null
+++ b/chessmaker/chess/rules/duck_chess.py
@@ -0,0 +1,25 @@
+from itertools import chain
+
+from chessmaker.chess.base import Board, as_rule, BeforeTurnChangeEvent
+from chessmaker.chess.pieces.duck import Duck
+from chessmaker.events import EventPriority
+
+
+def on_before_turn_change(event: BeforeTurnChangeEvent):
+ current_player = event.board.current_player
+ if current_player != event.next_player:
+ duck: Duck = [piece for piece in event.board.get_pieces() if isinstance(piece, Duck)][0]
+ if duck.movable:
+ duck.movable = False
+ duck.player = event.next_player
+ else:
+ event.board.turn_iterator = chain([event.next_player], event.board.turn_iterator)
+ event.set_next_player(current_player)
+ duck.movable = True
+
+
+def duck_chess(board: Board):
+ board.subscribe(BeforeTurnChangeEvent, on_before_turn_change, EventPriority.HIGH)
+
+
+DuckChess = as_rule(duck_chess)
diff --git a/chessmaker/clients/pywebio_ui.py b/chessmaker/clients/pywebio_ui.py
index ce6c743..3f5bc93 100644
--- a/chessmaker/clients/pywebio_ui.py
+++ b/chessmaker/clients/pywebio_ui.py
@@ -411,7 +411,7 @@ def main():
])
shared_position = shared_positions[get_query("position_id")]
new_game(lambda **_: Game(shared_position.board.clone(), deepcopy(shared_position.get_result)),
- shared_position.options, form_result["mode"], piece_urls)
+ shared_position.options, form_result["mode"], piece_urls)
return
form_result = input_group("New Game", [
@@ -447,7 +447,10 @@ def main():
create_game,
supported_options=["chess960", "knooks", "forced_en_passant", "knight_boosting", "omnipotent_f6_pawn",
"siberian_swipe", "il_vaticano", "beta_decay", "la_bastarda", "king_cant_move_to_c2",
- "vertical_castling", "double_check_to_win", "capture_all_pieces_to_win"],
- piece_urls=PIECE_URLS | {"Knook": ["https://i.imgur.com/UiWcdEb.png", "https://i.imgur.com/g7xTVts.png"]}
- ,remote_access=True, debug=True
+ "vertical_castling", "double_check_to_win", "capture_all_pieces_to_win", "duck_chess"],
+ piece_urls=PIECE_URLS |
+ {
+ "Knook": ["https://i.imgur.com/UiWcdEb.png", "https://i.imgur.com/g7xTVts.png"],
+ "Duck": ["https://i.imgur.com/ZZ2WSUq.png", "https://i.imgur.com/ZZ2WSUq.png"]
+ }
)
diff --git a/docs/api-reference/board.md b/docs/api-reference/board.md
index 0764507..f685404 100644
--- a/docs/api-reference/board.md
+++ b/docs/api-reference/board.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.board
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L1)
@@ -13,13 +13,13 @@
class AfterNewPieceEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L16)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L16)
#### piece: `Piece`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L17)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L17)
@@ -30,19 +30,19 @@ class AfterNewPieceEvent(Event)
class AfterRemoveSquareEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L21)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L21)
#### position: `Position`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L22)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L22)
#### square: `Square`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L23)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L23)
@@ -53,7 +53,7 @@ class AfterRemoveSquareEvent(Event)
class BeforeRemoveSquareEvent(AfterRemoveSquareEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L27)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L27)
@@ -64,19 +64,19 @@ class BeforeRemoveSquareEvent(AfterRemoveSquareEvent)
class AfterAddSquareEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L32)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L32)
#### position: `Position`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L33)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L33)
#### square: `Square`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L34)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L34)
@@ -87,7 +87,7 @@ class AfterAddSquareEvent(Event)
class BeforeAddSquareEvent(AfterAddSquareEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L38)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L38)
@@ -97,7 +97,7 @@ class BeforeAddSquareEvent(AfterAddSquareEvent)
def set_square(square: Square)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L39)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L39)
@@ -108,19 +108,19 @@ def set_square(square: Square)
class BeforeTurnChangeEvent(CancellableEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L44)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L44)
#### board: `"Board"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L45)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L45)
#### next\_player: `Player`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L46)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L46)
@@ -130,7 +130,7 @@ class BeforeTurnChangeEvent(CancellableEvent)
def set_next_player(next_player: Player)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L48)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L48)
@@ -141,19 +141,19 @@ def set_next_player(next_player: Player)
class AfterTurnChangeEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L53)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L53)
#### board: `"Board"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L54)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L54)
#### player: `Player`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L55)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L55)
@@ -166,7 +166,7 @@ class AfterTurnChangeEvent(Event)
class Board(Cloneable, EventPublisher)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L61)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L61)
@@ -176,7 +176,7 @@ class Board(Cloneable, EventPublisher)
def __init__(squares: list[list[Square | None]], players: list[Player], turn_iterator: Iterator[Player], rules: list[Rule] = None)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L62)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L62)
@@ -186,7 +186,7 @@ def __init__(squares: list[list[Square | None]], players: list[Player], turn_ite
def __getitem__(position: Position) -> Square | None
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L114)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L115)
@@ -196,7 +196,7 @@ def __getitem__(position: Position) -> Square | None
def __setitem__(position: Position, square: Square | None)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L117)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L118)
@@ -206,7 +206,7 @@ def __setitem__(position: Position, square: Square | None)
def __iter__() -> Iterable[Square]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L140)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L141)
@@ -216,7 +216,7 @@ def __iter__() -> Iterable[Square]
def get_pieces() -> Iterable[Piece]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L159)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L160)
@@ -226,7 +226,7 @@ def get_pieces() -> Iterable[Piece]
def get_player_pieces(player: Player) -> Iterable[Piece]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L164)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L165)
@@ -236,5 +236,5 @@ def get_player_pieces(player: Player) -> Iterable[Piece]
def clone()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\board.py#L169)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\board.py#L170)
diff --git a/docs/api-reference/events.md b/docs/api-reference/events.md
index 75e4d0c..092650b 100644
--- a/docs/api-reference/events.md
+++ b/docs/api-reference/events.md
@@ -2,7 +2,7 @@
# chessmaker.events.event
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event.py#L1)
@@ -13,7 +13,7 @@
class Event()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event.py#L5)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event.py#L5)
@@ -24,13 +24,13 @@ class Event()
class CancellableEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event.py#L10)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event.py#L10)
#### cancelled: `bool`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event.py#L11)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event.py#L11)
@@ -40,13 +40,13 @@ class CancellableEvent(Event)
def set_cancelled(cancelled: bool)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event.py#L13)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event.py#L13)
# chessmaker.events.event\_priority
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L1)
@@ -56,43 +56,43 @@ def set_cancelled(cancelled: bool)
class EventPriority(int, Enum)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L4)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L4)
#### VERY\_LOW
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L5)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L5)
#### LOW
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L6)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L6)
#### NORMAL
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L7)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L7)
#### HIGH
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L8)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L8)
#### VERY\_HIGH
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_priority.py#L9)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_priority.py#L9)
# chessmaker.events.event\_publisher
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L1)
@@ -102,7 +102,7 @@ class EventPriority(int, Enum)
class EventPublisher()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L18)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L18)
@@ -112,7 +112,7 @@ class EventPublisher()
def __init__(event_types: tuple[Type[Event], ...] = None)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L19)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L19)
@@ -122,7 +122,7 @@ def __init__(event_types: tuple[Type[Event], ...] = None)
def subscribe(event_type: Type[TEvent], callback: Callable[[TEvent], None], priority: int = EventPriority.NORMAL)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L27)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L27)
@@ -132,7 +132,7 @@ def subscribe(event_type: Type[TEvent], callback: Callable[[TEvent], None], prio
def unsubscribe(event_type: Type[TEvent], callback: Callable[[TEvent], None])
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L34)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L34)
@@ -142,7 +142,7 @@ def unsubscribe(event_type: Type[TEvent], callback: Callable[[TEvent], None])
def subscribe_to_all(callback: Callable[[Event], None], priority: int = EventPriority.NORMAL)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L38)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L38)
@@ -152,7 +152,7 @@ def subscribe_to_all(callback: Callable[[Event], None], priority: int = EventPri
def unsubscribe_from_all(callback: Callable[[Event], None])
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L42)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L42)
@@ -162,7 +162,7 @@ def unsubscribe_from_all(callback: Callable[[Event], None])
def publish(event: Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L46)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L46)
@@ -172,7 +172,7 @@ def publish(event: Event)
def propagate(publisher: 'EventPublisher', event_type: Type[Event])
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L50)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L50)
For all events publisher publishes of type event_type, publish them to self
@@ -184,7 +184,7 @@ For all events publisher publishes of type event_type, publish them to self
def propagate_all(publisher: 'EventPublisher')
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L58)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L58)
For all events publisher publishes, publish them to self
@@ -196,5 +196,5 @@ For all events publisher publishes, publish them to self
def event_publisher(*event_types: Type[Event]) -> Callable[[Type[T]], Type[T] | Type[EventPublisher]]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\events\event_publisher.py#L69)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\events\event_publisher.py#L69)
diff --git a/docs/api-reference/game.md b/docs/api-reference/game.md
index 01a487c..036d85f 100644
--- a/docs/api-reference/game.md
+++ b/docs/api-reference/game.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.game
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L1)
@@ -13,19 +13,19 @@
class AfterGameEndEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L9)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L9)
#### game: `"Game"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L10)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L10)
#### result: `str`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L11)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L11)
@@ -36,7 +36,7 @@ class AfterGameEndEvent(Event)
class Game(EventPublisher)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L15)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L15)
@@ -46,5 +46,5 @@ class Game(EventPublisher)
def __init__(board: Board, get_result: Callable[[Board], str | None])
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\game.py#L16)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\game.py#L16)
diff --git a/docs/api-reference/move-option.md b/docs/api-reference/move-option.md
index 64487f3..56b2b84 100644
--- a/docs/api-reference/move-option.md
+++ b/docs/api-reference/move-option.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.move\_option
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\move_option.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\move_option.py#L1)
@@ -13,23 +13,23 @@
class MoveOption()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\move_option.py#L7)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\move_option.py#L7)
#### position: `Position`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\move_option.py#L8)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\move_option.py#L8)
#### captures: `set[Position]`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\move_option.py#L9)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\move_option.py#L9)
#### extra: `dict[str, any]`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\move_option.py#L10)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\move_option.py#L10)
diff --git a/docs/api-reference/piece-utils.md b/docs/api-reference/piece-utils.md
index df76811..4e6385b 100644
--- a/docs/api-reference/piece-utils.md
+++ b/docs/api-reference/piece-utils.md
@@ -2,7 +2,7 @@
# chessmaker.chess.piece\_utils
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L1)
@@ -12,7 +12,7 @@
def is_in_board(board: Board, position: Position) -> bool
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L9)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L9)
@@ -22,7 +22,7 @@ def is_in_board(board: Board, position: Position) -> bool
def iterate_until_blocked(piece: Piece, direction: tuple[int, int]) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L20)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L20)
@@ -32,7 +32,7 @@ def iterate_until_blocked(piece: Piece, direction: tuple[int, int]) -> Iterable[
def get_diagonals_until_blocked(piece: Piece) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L39)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L39)
@@ -42,7 +42,7 @@ def get_diagonals_until_blocked(piece: Piece) -> Iterable[Position]
def get_horizontal_until_blocked(piece: Piece) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L44)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L44)
@@ -52,7 +52,7 @@ def get_horizontal_until_blocked(piece: Piece) -> Iterable[Position]
def get_vertical_until_blocked(piece: Piece) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L49)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L49)
@@ -62,7 +62,7 @@ def get_vertical_until_blocked(piece: Piece) -> Iterable[Position]
def get_straight_until_blocked(piece: Piece) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L54)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L54)
@@ -72,7 +72,7 @@ def get_straight_until_blocked(piece: Piece) -> Iterable[Position]
def filter_uncapturable_positions(piece: Piece, positions: Iterable[Position]) -> Iterable[Position]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L59)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L59)
@@ -82,5 +82,5 @@ def filter_uncapturable_positions(piece: Piece, positions: Iterable[Position]) -
def positions_to_move_options(board: Board, positions: Iterable[Position]) -> Iterable[MoveOption]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\piece_utils.py#L70)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\piece_utils.py#L70)
diff --git a/docs/api-reference/piece.md b/docs/api-reference/piece.md
index 8bf6851..0c79981 100644
--- a/docs/api-reference/piece.md
+++ b/docs/api-reference/piece.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.piece
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L1)
@@ -13,19 +13,19 @@
class AfterGetMoveOptionsEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L15)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L15)
#### piece: `"Piece"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L16)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L16)
#### move\_options: `Iterable[MoveOption]`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L17)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L17)
@@ -35,7 +35,7 @@ class AfterGetMoveOptionsEvent(Event)
class BeforeGetMoveOptionsEvent(AfterGetMoveOptionsEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L20)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L20)
@@ -45,7 +45,7 @@ class BeforeGetMoveOptionsEvent(AfterGetMoveOptionsEvent)
def set_move_options(move_options: Iterable[MoveOption])
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L21)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L21)
@@ -56,19 +56,19 @@ def set_move_options(move_options: Iterable[MoveOption])
class AfterMoveEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L26)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L26)
#### piece: `"Piece"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L27)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L27)
#### move\_option: `MoveOption`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L28)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L28)
@@ -78,7 +78,7 @@ class AfterMoveEvent(Event)
class BeforeMoveEvent(AfterMoveEvent, CancellableEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L31)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L31)
@@ -88,7 +88,7 @@ class BeforeMoveEvent(AfterMoveEvent, CancellableEvent)
def set_move_option(move_option: MoveOption)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L32)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L32)
@@ -99,13 +99,13 @@ def set_move_option(move_option: MoveOption)
class AfterCapturedEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L37)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L37)
#### captured\_piece: `"Piece"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L38)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L38)
@@ -115,13 +115,13 @@ class AfterCapturedEvent(Event)
class BeforeCapturedEvent(AfterCapturedEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L41)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L41)
#### PIECE\_EVENT\_TYPES
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L45)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L45)
@@ -132,7 +132,7 @@ class BeforeCapturedEvent(AfterCapturedEvent)
class Piece(Cloneable, EventPublisher)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L50)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L50)
@@ -142,7 +142,7 @@ class Piece(Cloneable, EventPublisher)
def __init__(player: Player)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L51)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L51)
@@ -152,7 +152,7 @@ def __init__(player: Player)
def __repr__()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L56)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L56)
@@ -162,7 +162,7 @@ def __repr__()
def get_move_options() -> Iterable[MoveOption]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L59)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L59)
@@ -172,7 +172,7 @@ def get_move_options() -> Iterable[MoveOption]
def move(move_option: MoveOption)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L69)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L69)
@@ -182,18 +182,7 @@ def move(move_option: MoveOption)
def on_join_board()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L92)
-
-
-
-#### player
-
-```python
-@property
-def player()
-```
-
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L96)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L92)
@@ -204,7 +193,7 @@ def player()
def position()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L100)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L96)
@@ -215,7 +204,7 @@ def position()
def board()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L104)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L100)
@@ -228,7 +217,7 @@ def board()
def name(cls)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L112)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L108)
@@ -239,5 +228,5 @@ def name(cls)
def clone()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\piece.py#L120)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\piece.py#L116)
diff --git a/docs/api-reference/player.md b/docs/api-reference/player.md
index 098e269..ba0d528 100644
--- a/docs/api-reference/player.md
+++ b/docs/api-reference/player.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.player
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\player.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\player.py#L1)
@@ -13,13 +13,13 @@
class Player()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\player.py#L6)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\player.py#L6)
#### name: `str`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\player.py#L7)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\player.py#L7)
@@ -29,5 +29,5 @@ class Player()
def __repr__()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\player.py#L13)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\player.py#L13)
diff --git a/docs/api-reference/position.md b/docs/api-reference/position.md
index fd8b9f2..fd843fa 100644
--- a/docs/api-reference/position.md
+++ b/docs/api-reference/position.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.position
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L1)
@@ -12,19 +12,19 @@
class Position(NamedTuple)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L4)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L4)
#### x: `int`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L5)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L5)
#### y: `int`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L6)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L6)
@@ -34,7 +34,7 @@ class Position(NamedTuple)
def __str__()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L8)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L8)
@@ -44,5 +44,5 @@ def __str__()
def offset(x: int, y: int)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\position.py#L11)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\position.py#L11)
diff --git a/docs/api-reference/rule.md b/docs/api-reference/rule.md
index d04ee86..61c779c 100644
--- a/docs/api-reference/rule.md
+++ b/docs/api-reference/rule.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.rule
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\rule.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\rule.py#L1)
@@ -12,7 +12,7 @@
class Rule(Cloneable)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\rule.py#L10)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\rule.py#L10)
@@ -23,7 +23,7 @@ class Rule(Cloneable)
def on_join_board(board: "Board")
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\rule.py#L12)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\rule.py#L12)
@@ -34,7 +34,7 @@ def on_join_board(board: "Board")
def clone()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\rule.py#L16)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\rule.py#L16)
@@ -44,5 +44,5 @@ def clone()
def as_rule(rule_func: Callable[["Board"], None]) -> Type[Rule]
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\rule.py#L20)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\rule.py#L20)
diff --git a/docs/api-reference/square.md b/docs/api-reference/square.md
index b39845d..86c4128 100644
--- a/docs/api-reference/square.md
+++ b/docs/api-reference/square.md
@@ -2,7 +2,7 @@
# chessmaker.chess.base.square
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L1)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L1)
@@ -13,19 +13,19 @@
class AfterAddPieceEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L14)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L14)
#### square: `"Square"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L15)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L15)
#### piece: `"Piece"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L16)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L16)
@@ -35,7 +35,7 @@ class AfterAddPieceEvent(Event)
class BeforeAddPieceEvent(AfterAddPieceEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L19)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L19)
@@ -45,7 +45,7 @@ class BeforeAddPieceEvent(AfterAddPieceEvent)
def set_piece(piece: "Piece")
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L20)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L20)
@@ -56,19 +56,19 @@ def set_piece(piece: "Piece")
class BeforeRemovePieceEvent(Event)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L25)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L25)
#### square: `"Square"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L26)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L26)
#### piece: `"Piece"`
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L27)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L27)
@@ -78,13 +78,13 @@ class BeforeRemovePieceEvent(Event)
class AfterRemovePieceEvent(BeforeRemovePieceEvent)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L30)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L30)
#### SQUARE\_EVENT\_TYPES
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L34)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L34)
@@ -95,7 +95,7 @@ class AfterRemovePieceEvent(BeforeRemovePieceEvent)
class Square(Cloneable, EventPublisher)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L38)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L38)
@@ -105,7 +105,7 @@ class Square(Cloneable, EventPublisher)
def __init__(piece: Optional["Piece"] = None)
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L39)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L39)
@@ -116,7 +116,7 @@ def __init__(piece: Optional["Piece"] = None)
def piece() -> "Piece"
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L45)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L45)
@@ -127,7 +127,7 @@ def piece() -> "Piece"
def position()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L49)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L49)
@@ -138,7 +138,7 @@ def position()
def board()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L53)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L53)
@@ -149,7 +149,7 @@ def board()
def piece(piece: "Piece")
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L59)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L59)
@@ -159,5 +159,5 @@ def piece(piece: "Piece")
def clone()
```
-[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/d55fc2f32f12721e1fe31900fd59416040ea3896/chessmaker\chess\base\square.py#L80)
+[[view_source]](https://github.com/WolfDWyc/ChessMaker/blob/31277ef9b150ef22d5ea0caafe33d2906b6c7f48/chessmaker\chess\base\square.py#L80)
diff --git a/docs/getting-started.md b/docs/getting-started.md
index b0ef3cc..e986c70 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -21,11 +21,14 @@ if __name__ == "__main__":
create_game, # (1)
supported_options=["chess960", "knooks", "forced_en_passant", "knight_boosting", "omnipotent_f6_pawn",
"siberian_swipe", "il_vaticano", "beta_decay", "la_bastarda", "king_cant_move_to_c2",
- "vertical_castling", "double_check_to_win", "capture_all_pieces_to_win"],
- piece_urls=PIECE_URLS | {"Knook": ["https://i.imgur.com/UiWcdEb.png", "https://i.imgur.com/g7xTVts.png"]}, # (2)
- remote_access=True # (3)
+ "vertical_castling", "double_check_to_win", "capture_all_pieces_to_win", "duck_chess"],
+ piece_urls=PIECE_URLS |
+ {
+ "Knook": ["https://i.imgur.com/UiWcdEb.png", "https://i.imgur.com/g7xTVts.png"],
+ "Duck": ["https://i.imgur.com/ZZ2WSUq.png", "https://i.imgur.com/ZZ2WSUq.png"]
+ } # (2)
+ ,remote_access=True # (3)
)
-
```
1. The **game_factory** argument is a function that creates a new game instance.
@@ -60,7 +63,7 @@ from chessmaker.chess.pieces import Knight
from chessmaker.chess.pieces import Pawn
from chessmaker.chess.pieces import Queen
from chessmaker.chess.pieces import Rook
-from chessmaker.chess.results import checkmate, stalemate, Repetition, NoCapturesOrPawnMoves
+from chessmaker.chess.results import no_kings, checkmate, stalemate, Repetition, NoCapturesOrPawnMoves
from chessmaker.clients import start_pywebio_chess_server
@@ -68,7 +71,7 @@ def _empty_line(length: int) -> list[Square]:
return [Square() for _ in range(length)]
def get_result(board: Board) -> str:
- for result_function in [checkmate, stalemate, Repetition(3), NoCapturesOrPawnMoves(50)]:
+ for result_function in [no_kings, checkmate, stalemate, Repetition(3), NoCapturesOrPawnMoves(50)]:
result = result_function(board)
if result:
return result
diff --git a/docs/index.md b/docs/index.md
index 11567b7..129c4d8 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -18,11 +18,14 @@ Play: [https://chessmaker.azurewebsites.net](https://chessmaker.azurewebsites.ne
ChessMaker is a Python (3.11+) chess implementation that can be extended to support any custom rule or feature.
It allows you to build almost any variant you can think of easily and quickly.
-ChessMaker isn't tied to any GUI, but comes with a thin, [pywebio](https://pywebio.readthedocs.io/en/latest/), multiplayer web interface.
-
It was inspired by [r/AnarchyChess](https://www.reddit.com/r/AnarchyChess/) - and the packaged optional rules are almost all inspired by that subreddit.
-These rules are:
+ChessMaker isn't tied to any GUI, but comes with a thin, [pywebio](https://pywebio.readthedocs.io/en/latest/), multiplayer web interface.
+The web interface supports choosing from the packaged rules, singleplayer (vs Yourself), and multiplayer
+(vs a friend or random opponent). It also supports saving and loading games - which can be shared with others
+and be used as puzzles.
+
+The packaged rules are:
* Chess960
* Knooks
@@ -37,16 +40,20 @@ These rules are:
* Vertical Castling
* Double Check to Win
* Capture All Pieces to Win
+* Duck Chess
+
+Contributions of new variants or anything else you'd like to see in the project are welcome!
## What ChessMaker isn't
-* A complete chess server - It doesn't support users, matchmaking, ratings, cheating detection, etc.
-The frontend is very simple and not the focus of the project.
-* A chess engine. The design choices are not optimized for speed, and it doesn't provide any analysis or AI.
-* A compliant or standard chess implementation. It doesn't support UCI or existing chess GUIs,
+* A complete chess server - It currently doesn't support users, matchmaking, ratings, cheating detection,
+and is very thin. The frontend is very simple and currently not the focus of the project.
+* A chess engine - The design choices are not optimized for speed, and it doesn't provide any analysis or AI.
+* A compliant or standard chess implementation - It doesn't support UCI or existing chess GUIs,
because it allows rules that wouldn't be possible with those.
!!! note
While ChessMaker isn't a chess server, one could be built on top of it, and development of alternative clients to it is welcomed and encouraged.
+ If this project gets enough interest, a more complete server might be added.
diff --git a/docs/packaged-variants.md b/docs/packaged-variants.md
index 5fcec6e..7ea3536 100644
--- a/docs/packaged-variants.md
+++ b/docs/packaged-variants.md
@@ -21,3 +21,4 @@ the appropriate boxes in the "Options" section of the "New Game" screen.
| Vertical Castling | Castlling can also be done vertically. |
| Double Check To Win | In addition to checkmating, a player can win by giving check with 2 pieces or more. |
| Capture All Pieces To Win | Instead of checkmating, a player can win by capturing all pieces of the opponent. Kings can be under attack and can be taken. |
+| Duck Chess | There is a Duck on the board which can not capture or be captured, but can move to any position. After playing a turn, the player has to move duck to a different square. There are no checks, and you lose by getting your King captured. |
diff --git a/pyproject.toml b/pyproject.toml
index addfb8b..227e373 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chessmaker"
-version = "0.4.3"
+version = "0.5.0"
description = "An easily extendible chess implementation designed to support any custom rule or feature"
readme = "README.md"
authors = ["WolfDWyc ",]