manim-chess 0.0.3__tar.gz → 0.0.32__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- manim_chess-0.0.32/LICENSE.txt +7 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/PKG-INFO +1 -1
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/__init__.py +2 -1
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/board.py +10 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/pyproject.toml +1 -1
- {manim_chess-0.0.3 → manim_chess-0.0.32}/README.md +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/evaluation_bar.py +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/game_player.py +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bB.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bK.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bN.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bP.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bQ.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/bR.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wB.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wK.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wN.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wP.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wQ.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/piece_svgs/wR.svg +0 -0
- {manim_chess-0.0.3 → manim_chess-0.0.32}/manim_chess/pieces.py +0 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright 2025 Logan Swoyer
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -40,6 +40,8 @@ class Board(Mobject):
|
|
40
40
|
Converts a linear index to a board coordinate.
|
41
41
|
set_board_from_FEN(FEN):
|
42
42
|
Sets up the board pieces according to a FEN string.
|
43
|
+
clear_board():
|
44
|
+
Removes all pieces from the board.
|
43
45
|
is_light_square(coordinate):
|
44
46
|
Determines if a square is a light-colored square.
|
45
47
|
mark_square(coordinate):
|
@@ -264,6 +266,14 @@ class Board(Mobject):
|
|
264
266
|
self.add_piece(char.upper(), char.isupper(), coordinate)
|
265
267
|
current_index += 1
|
266
268
|
|
269
|
+
def clear_board(self) -> None:
|
270
|
+
"""
|
271
|
+
Removes all pieces from the board.
|
272
|
+
"""
|
273
|
+
for coordinate in self.pieces:
|
274
|
+
self.remove(self.pieces[coordinate])
|
275
|
+
self.pieces = {}
|
276
|
+
|
267
277
|
def is_light_square(self, coordinate: str) -> bool:
|
268
278
|
"""
|
269
279
|
Determines if a square is a light-colored square.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|