Files
cis163/chess/pawn.py
cutsweettea cb8e6e9b5a more cool stuff
chess, woah
2025-10-15 12:46:55 -04:00

12 lines
434 B
Python

from chess_piece import ChessPiece
from move import Move
from player import Player
from move_sets import pawn_valid_move_sets
class Pawn(ChessPiece):
def __init__(self, piece_color: Player):
super().__init__(piece_color)
def is_valid_move(self, move: Move, board: list[list[ChessPiece]]) -> bool:
# run original check and other piece specific checks
orig_is_valid = super().is_valid_move(move, board)