more cool stuff

chess, woah
This commit is contained in:
cutsweettea
2025-10-15 12:46:55 -04:00
parent 52ee1d7a8b
commit cb8e6e9b5a
12 changed files with 663 additions and 0 deletions

35
chess/chess_model.py Normal file
View File

@@ -0,0 +1,35 @@
from enum import Enum
from player import Player
from move import Move
from chess_piece import ChessPiece
from pawn import Pawn
from rook import Rook
from knight import Knight
from bishop import Bishop
from queen import Queen
from king import King
from move import Move
class MoveValidity(Enum):
Valid = 1
Invalid = 2
MovingIntoCheck = 3
StayingInCheck = 4
def __str__(self):
if self.value == 2:
return 'Invalid move.'
if self.value == 3:
return 'Invalid -- cannot move into check.'
if self.value == 4:
return 'Invalid -- must move out of check.'
# TODO: create UndoException
class ChessModel:
# TODO: fill in this class
pass