Skip to content

antdimot/chess-movement-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Movements Validator

Abstract

Chess movement engine validator using .Net Core.

Examples

// create a new board for play and move a Pawn
var board = Board.NewGame();
var result = board.MovePiece( 'A', 2, 'A', 4 );

// create a empty board, set a Pawn and move it
var board = Board.NewEmpty();
board.SetWhite<Pawn>( 'A', 5 );
var result = board.MovePiece( 'A', 2, 'A', 4 );

// create a new game and try to move a wrong color piece
var game = new ChessGame();
var result = game.MovePiece( 'F', 7, 'F', 8 );

> The piece selected has wrong color.
> The next player is WHITE

Useful information

Chess.Core is a .Net Standard Library which contains the chess domain model (ie. Piece, Board, Game .....).

Chess.Player is a simple .Net console useful for simulating a chess game directly from text console. Chess Player

Building and running instructions

About

A chess engine validator written in C#.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages