ChessLite 1.0.0-alpha.10
This is a prerelease version of ChessLite.
dotnet add package ChessLite --version 1.0.0-alpha.10
NuGet\Install-Package ChessLite -Version 1.0.0-alpha.10
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ChessLite" Version="1.0.0-alpha.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ChessLite" Version="1.0.0-alpha.10" />
<PackageReference Include="ChessLite" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ChessLite --version 1.0.0-alpha.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ChessLite, 1.0.0-alpha.10"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ChessLite@1.0.0-alpha.10
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ChessLite&version=1.0.0-alpha.10&prerelease
#tool nuget:?package=ChessLite&version=1.0.0-alpha.10&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ChessLite
A lightweight, high-performance chess library for .NET. ChessLite provides fast move generation, legal move validation, and game state management using modern chess engine data structures and methods.
This library just provides some core chess logic that may be suitable for writing a high-performance chess engine, creating a chess GUI, or even a chess game.
Requirements
- .NET 8.0 or later
Example Usage
using ChessLite;
using ChessLite.Movement;
using ChessLite.Parsing;
// Create a new game
var game = new Game();
// Or start from a specific position
var position = Fen.Parse("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
var gameFromFen = new Game(position);
// You can parse PGN as well
var pgnGame = Pgn.Parse("1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 1-0");
// Get all legal moves
foreach (var move in game.GetLegalMoves())
{
Console.WriteLine(move);
}
// Or with zero allocations (moves written to buffer)
Span<Move> movesBuffer = stackalloc Move[218];
var moveCount = game.WriteLegalMoves(movesBuffer);
// Make a move using UCI notation
game.MakeUciMove("e2e4");
// Or with short algebraic notation (SAN)
game.MakeSanMove("Nf6");
// Undo the last move
game.UndoMove();
// Format the current position as FEN or PGN
string fen = Fen.Format(game);
string pgn = Pgn.Format(pgnGame);
Acknowledgments
- For the inspiration to start this project, this video by Bartek Spitza
- The chess programming community at the Chess Programming Wiki
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.10 | 75 | 6/9/2026 |
| 1.0.0-alpha.9 | 80 | 6/7/2026 |
| 1.0.0-alpha.8 | 64 | 6/7/2026 |
| 1.0.0-alpha.7 | 71 | 6/5/2026 |
| 1.0.0-alpha.6 | 78 | 6/5/2026 |
| 1.0.0-alpha.5 | 66 | 6/3/2026 |
| 1.0.0-alpha.4 | 69 | 6/1/2026 |
| 1.0.0-alpha.3 | 97 | 3/16/2026 |
| 1.0.0-alpha.2 | 87 | 1/25/2026 |
| 1.0.0-alpha.1 | 87 | 1/25/2026 |