pax.chess 0.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package pax.chess --version 0.5.2
                    
NuGet\Install-Package pax.chess -Version 0.5.2
                    
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="pax.chess" Version="0.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="pax.chess" Version="0.5.2" />
                    
Directory.Packages.props
<PackageReference Include="pax.chess" />
                    
Project file
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 pax.chess --version 0.5.2
                    
#r "nuget: pax.chess, 0.5.2"
                    
#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.
#addin nuget:?package=pax.chess&version=0.5.2
                    
Install pax.chess as a Cake Addin
#tool nuget:?package=pax.chess&version=0.5.2
                    
Install pax.chess as a Cake Tool

Introduction

C# dotnet 6 chess library with pgn/fen import/export and move validation.

Getting started

Prerequisites

dotnet 6

Installation

You can install it with the Package Manager in your IDE or alternatively using the command line:

dotnet add package pax.chess

Usage

Game game = new Game();
EngineMove move = new EngineMove(new Position(4, 2), new Position(5, 3));
var state = game.Move(move);
var pgn = Pgn.MapPieces(game.State);
string pgn = "1. e4 e5 2. Bc4 Bc5 3. Qh5 Nf6 4. Qxf7#";
Game game = Pgn.MapString(pgn);
Assert.True(game.State.Info.IsCheckMate);

string pgn = "1. e4 d5 2. exd5 e6 3. dxe6 Qe7 4. Nc3 Bxe6 5. b3 Bxb3+";
Game game = Pgn.MapString(pgn);
var state = game.Move(new EngineMove(new Position(0, 1), new Position(1, 2)));
Assert.True(state == MoveState.WouldBeCheck);
string fen = "2r3k1/6pp/p3pp1B/2bn4/2pK3P/3b1PR1/P7/3R4 w - - 2 31";
Game game = new Game(fen);
Assert.True(game.State.Info.IsCheckMate);

string pgn = "1. g4 h5 2. gxh5 Rxh5 3. Nf3 Rh6 4. Bh3 Rg6";
Game game = Pgn.MapString(pgn);
var state = game.Move(new EngineMove(new Position(4, 0), new Position(6, 0)));
Assert.True(state == MoveState.CastleNotAllowed);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on pax.chess:

Package Downloads
pax.uciChessEngine

C# dotnet Universal Chess Interface wrapper for interacting with chess engine processes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.6 82 23 days ago
0.6.5 63 23 days ago
0.6.4 97 24 days ago
0.6.3 158 24 days ago 0.6.3 is deprecated because it has critical bugs.
0.6.2 3,204 12/18/2023
0.6.1 1,328 1/23/2022
0.6.0 817 1/20/2022
0.5.5 814 1/16/2022
0.5.4 808 1/13/2022
0.5.3 304 1/9/2022
0.5.2 815 1/6/2022