Skip to content

Nima-Mollaei/Chess_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

♟️Chess_Game

A complete chess game with rules, move validation, and GUI built using Python & Tkinter.
Supports castling, promotion, en passant, undo, and more.

Main Board Screenshot


🎯 Overview

This project is a full-featured chess engine and GUI built with Python and Tkinter. It is built entirely from scratch without external libraries for logic or rendering. It is ideal for learning GUI design, game logic, and chess rules implementation.


🎮 Features

✅ Classic 8×8 chessboard with Unicode pieces
✅ All standard rules of chess enforced:

  • Legal move validation
  • Castling (both sides)
  • En passant
  • Promotion (default to queen)
  • Check & checkmate detection

✅ Interactive GUI with:

  • Highlighted selected pieces and possible moves
  • Undo last move
  • Turn indicators
  • Error prevention (can’t move enemy pieces or make illegal moves)

🚀 Installation

Prerequisites

  • Python 3.6+
  • No external libraries needed (uses only built-in tkinter)

Run the Game

git clone https://github.com/your-username/tkinter-chess.git
cd Chess_Game
python chess_game.py

🧩 How It Works

The project consists of:

  • chess_game.py: Main script containing all classes for board logic and Tkinter rendering.

  • Board class handles:

    • Piece setup
    • Movement rules
    • Special chess rules
  • GUI layer handles:

    • Drawing the board and pieces
    • Event bindings
    • Updating board state after moves

Architecture is modular and easily extensible for future enhancements.


🖼 Screenshots

Chessboard GUI Move Highlighting


🤝 Contributing

Feel free to contribute to this project! Fork the repository and submit a pull request. If you find any issues or have suggestions, please open an issue.

About

A full-featured chess game built with Python and Tkinter. Supports all chess rules, including castling, promotion, en passant, and more — no external libraries required.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages