Update multi_agent.py
Browse files- multi_agent.py +6 -3
multi_agent.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import cairosvg, chess, chess.svg, os
|
2 |
from autogen import ConversableAgent, register_function
|
|
|
3 |
from typing_extensions import Annotated
|
4 |
|
5 |
made_move = False
|
@@ -21,13 +22,15 @@ def make_move(move: Annotated[str, "A move in UCI format."]) -> Annotated[str, "
|
|
21 |
global made_move
|
22 |
made_move = True
|
23 |
|
24 |
-
png = convert_svg_to_png(chess.svg.board(
|
25 |
board,
|
26 |
arrows=[(move.from_square, move.to_square)],
|
27 |
fill={move.from_square: "gray"},
|
28 |
size=200
|
29 |
-
))
|
30 |
-
|
|
|
|
|
31 |
piece = board.piece_at(move.to_square)
|
32 |
piece_symbol = piece.unicode_symbol()
|
33 |
piece_name = (
|
|
|
1 |
import cairosvg, chess, chess.svg, os
|
2 |
from autogen import ConversableAgent, register_function
|
3 |
+
from IPython.display import SVG
|
4 |
from typing_extensions import Annotated
|
5 |
|
6 |
made_move = False
|
|
|
22 |
global made_move
|
23 |
made_move = True
|
24 |
|
25 |
+
png = SVG(convert_svg_to_png(chess.svg.board(
|
26 |
board,
|
27 |
arrows=[(move.from_square, move.to_square)],
|
28 |
fill={move.from_square: "gray"},
|
29 |
size=200
|
30 |
+
)))
|
31 |
+
|
32 |
+
print(png)
|
33 |
+
|
34 |
piece = board.piece_at(move.to_square)
|
35 |
piece_symbol = piece.unicode_symbol()
|
36 |
piece_name = (
|