Skip to content

allenjiang17/PythonChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PythonChess

A simple implementation of Chess using Python and object-oriented programming.

chess.py contains the essential functions and classes for Chess. Each piece is its own object that has its functions for generating a legal moveset. The Board class contains the locations of each piece and implements game-wide functions such as checking for check, determining how each piece's moveset changes as it interacts with other pieces.

chess_game.py demonstrates a rudimentary working GUI for chess using Pygame.

To run chess_game.py, first download Pygame: https://www.pygame.org/wiki/GettingStarted

To see a live web version built using Javascript and React, go here: https://allenjiang17.github.io/chess_react/

Examples:

Shows legal moves when piece is highlighted

King highlighted when in check

Pawn has no legal moves since it would expose King to check

TODO:

Checkmate and end game condition needs to be implemented

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages