Download Latest Version JLightChessLib-0.7.0.jar (58.7 kB)
Email in envelope

Get an email when there's a new version of JLightChessLib

Home / 0.6.4
Name Modified Size InfoDownloads / Week
Parent folder
JLightChessLib-0.6.4.jar 2012-09-09 50.4 kB
Totals: 1 Item   50.4 kB 0
JLightChessLib : another chess library.
---------------------------------------

JLightChessLib is a chess library written in order to have a minimum set of functionality :
=> Validating moves
=> Manage history : with main line and variations management for each node.
Also, note that it was not designed to be very fast, so you may not use it in order to code an engine.

Now, there is a little new feature : the library takes into account the 50 moves rule,
and the chess client is notified whenever we reach this limit.

I've also written a demo application using this library : https://sourceforge.net/projects/lightchslibdemo/
(I would like to apologize as it is poorly documented/commented).

Built with oracle java jdk 7 : check your java version if you encounters usage problems.

=================================
History
=================================

0.7.0)
I've added intertionalisation support : now messages are translated into english or french.

0.6.8)
-- I've corrected a big bug in  the FenNotationConverter class : the player turn was inverted for the parsing/decoding
(it was coded white turn instead of black turn and vice versa).
-- I've nearly completely changed the class ChessHistoryNode.
-- The method getPromotionPieceKind() of the interface PromotionListener now requires a boolean, for saying whether
it is for the white pieces owner.
-- I've corrected a incoherence in the 50 moves rule count : in some code I based myself on half moves, and in some other
code I based myself on full moves count.

0.6.6)
The library now has a new errors notification management : whereas before it threw ForbiddenMoveException,
now it use an Observer Pattern. User error notifiers must implement the interface 
UserMessagesNotifier, and the chess client classes responsible for showing errors to user must
implement UserMessagesShower and register to the ChessGame ChessBoard (which is an implementer of
UserMessagesNotifier).
Moreover, the library now updates the 50 moves rule counter after every move (but not when just reading history).
And whenever the game reach the 50 moves count, the game is registered as a draw, chess client is notified,
and no more move can be added (except if we go back in history and change at least one move to a pawn move,
or a capture move, so that the counter is reset).

0.6.4)
I've added two useful methods in ChessBoard and ChessBoardCell classes (located in the core package) :
-> ChessBoard now has a public method checkForPositionValidity() that throw an exception is the current position is invalid (pawns located
on the 1st/8th rank, kings too close, ...).
-> ChessBoardCell now has a isAdjacentTo(ChessBoardCell) method, that returns true if the cell which receive the message is adjacent to
the other cell to test.

0.6.2)
An important bug fix !!! When setting a new position with a fen code, the empty cells were not "erased", but instead
just skipped, so that the kept their old values !!!

0.6.0)
The following features has been implemented and successfully tested.
The moves validator is fully functional : even en passant capture, castling trying to escape from chess or
doing a move that would put your king in chess, are checked.
There is also an interface in order to define a callback, letting you choose the way the user will be able to choose its
promotion piece.
Source: README.txt, updated 2012-10-09