Chess move validation library [closed]

允我心安 提交于 2019-12-04 06:16:11
Adam Berent

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

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.

i published my chess-movement-validator on github.

Example:

var board = Board.GetNewBoard();

board.SetPiece<Rook>( ChessColor.White, 'A', 1 );

var result = board.MovePiece( 'A', 1, 'A', 8 );
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!