mirror of
https://github.com/ghndrx/shellmate.git
synced 2026-02-10 14:55:08 +00:00
Remove move highlighting - cleaner board display
This commit is contained in:
@@ -285,15 +285,8 @@ async def run_chess_game(process, session: TerminalSession, username: str, oppon
|
|||||||
|
|
||||||
def get_cell_style(square, piece, is_light):
|
def get_cell_style(square, piece, is_light):
|
||||||
"""Get ANSI style for a cell based on selection state."""
|
"""Get ANSI style for a cell based on selection state."""
|
||||||
is_selected = (square == selected_square)
|
# Simple dark/light squares only - no highlighting
|
||||||
is_target = (square in legal_targets)
|
if is_light:
|
||||||
|
|
||||||
# Background colors
|
|
||||||
if is_selected:
|
|
||||||
bg = "\033[48;5;33m" # Blue for selected
|
|
||||||
elif is_target:
|
|
||||||
bg = "\033[48;5;28m" # Green for legal moves
|
|
||||||
elif is_light:
|
|
||||||
bg = "" # Default terminal
|
bg = "" # Default terminal
|
||||||
else:
|
else:
|
||||||
bg = "\033[48;5;236m" # Dark grey
|
bg = "\033[48;5;236m" # Dark grey
|
||||||
@@ -334,9 +327,6 @@ async def run_chess_game(process, session: TerminalSession, username: str, oppon
|
|||||||
piece_row += f"{bg} \033[1;97m{char}\033[0m{bg} {bg_end}"
|
piece_row += f"{bg} \033[1;97m{char}\033[0m{bg} {bg_end}"
|
||||||
else:
|
else:
|
||||||
piece_row += f"{bg} \033[1;33m{char}\033[0m{bg} {bg_end}"
|
piece_row += f"{bg} \033[1;33m{char}\033[0m{bg} {bg_end}"
|
||||||
elif square in legal_targets:
|
|
||||||
# Show dot for legal empty target
|
|
||||||
piece_row += f"{bg} \033[1;32m·\033[0m{bg} {bg_end}"
|
|
||||||
else:
|
else:
|
||||||
piece_row += f"{bg} {bg_end}"
|
piece_row += f"{bg} {bg_end}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user