Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chess move validation library [closed]

Is there any library which can be used to validate chess moves and simulate games in .NET? It would be great if the library can understand moves in Algebraic notation and also provide simple API for making moves. For example, game.Move("E2","E4") etc. In the second case, the library should be able to generate Algebraic notation for the moves. I don't want it to make moves or to play chess etc, just a library for game validation and game simulation. Any links?

like image 463
coder and just coder Avatar asked Sep 28 '09 11:09

coder and just coder


People also ask

Is there a chess module in Python?

The chess module is a pure Python chess library with move generation, move validation and support for common formats. We can play chess with it. It will help us to move the king queen, pawn, bishops and knights.

What is Python chess library?

python-chess is a chess library for Python, with move generation, move validation, and support for common formats. This is the Scholar's mate in python-chess: >>> import chess >>> board = chess. Board() >>> board.

How does chess annotation work?

Notation for moves. Each move of a piece is indicated by the piece's uppercase letter, plus the coordinate of the destination square. For example, Be5 (bishop moves to e5), Nf3 (knight moves to f3). For pawn moves, a letter indicating pawn is not used, only the destination square is given.

What is chess js?

chess. js is a Javascript chess library that is used for chess move generation/validation, piece placement/movement, and check/checkmate/stalemate detection - basically everything but the AI. chess. js has been extensively tested in node. js and most modern browsers.


2 Answers

Have a look at the C# Chess Game Starter Kit. It is a C# Open Source Application that does exactly what you requested and it is free for commercial use.

For a detailed explanation of the source code see:

http://www.chessbin.com

like image 183
Adam Berent Avatar answered Sep 21 '22 18:09

Adam Berent


There is also sharpchess which is open source (under GNU GPL) and written for .Net v2 It has a core engine as well as a WinForm GUI. Although it does play chess, I believe that you potentially strip out the "game engine" to leave a shell for simulation.

Some bullet points from the site

* Graphical chess board.
* Helpful high-lighting of legal chess moves, when clicking on a piece.
* Move history displayed.
* Undo/Redo moves.
* Load/Save chess games during play.
* Replay your saved games.
* Paste FEN positions from the clipboard.

Chess engine features

* WinBoard compatible.
* 0x88 board representation.
* Opening book containing over 1300 varied opening positions.

Programming features

* A well-designed, and hopefully easy-to-understand, object-model that will enable other developers to quickly get involved in the project.
like image 42
Cheshire Cat Avatar answered Sep 18 '22 18:09

Cheshire Cat