A C# library for chess logic, providing a reusable set of classes and methods to handle chess game mechanics.
PureChessLib is a C# library that encapsulates the logic and mechanics of a chess game. It's designed to be a reusable and flexible solution for developers who want to integrate chess functionality into their applications, games, or projects.
This library provides classes and methods to manage the chessboard, player turns, legal moves, and other core chess-related features. By using PureChessLib, you can focus on building user interfaces, AI opponents, or other game features without having to reimplement the fundamental rules of chess.
- Chessboard representation and manipulation.
- Move validation and legality checks.
- Player turn management.
- Support for standard chess rules, including castling, en passant, and pawn promotion.
- Easily extensible for custom chess variants or additional rules.
To use PureChessLib in your C# project, follow these steps:
- Download or clone this repository to your local machine.
- Reference the
PureChessLib.dllin your project. - Import the necessary namespaces and start using the library's classes and methods.
using PureChess;
// Example usage
string startPosition = "RNBQKBNR/PPPPPPPP/......../......../......../......../pppppppp/rnbqkbnr"; //Fen isn't supported yet!
Game.StartGame()
// ... Continue with your codeFor more detailed information on how to use specific features, refer to the documentation.
Contributions to PureChessLib are welcome! If you find any issues, have suggestions for improvements, or want to add new features, please open an issue or create a pull request. Make sure to read the contribution guidelines before getting started.
This project is licensed under the MIT License. Check LICENSE.MD for more details.
