Commit Graph

18 Commits

Author SHA1 Message Date
Kai S. K. Engelbart 72aa8d0881
Reformat everything (mainly to fit 80 character width limit) 2020-08-15 23:25:52 +02:00
Kai S. K. Engelbart 2333021bba
Add missing Javadoc 2020-08-15 23:25:50 +02:00
Kai S. K. Engelbart f4768b7ac3
Working on move history navigation
* Enabled "next" and "previous" buttons
* Added corresponding methods to Board
* Added Move#invert()
* Rendering variation count in MoveNodeRenderer

The added functionality does not work correctly at the moment. This is
probably caused due to missing synchronization between the state of the
board, the game and the user interface.
2020-08-15 23:25:50 +02:00
Kai S. K. Engelbart 4723127bc8
Implemented saving to PGN file
+ copyVariations parameter in copy constructors of Board and Log

This procedure still required work in the form of efficiently rewinding
the board to the first position for SAN move extraction and shortening
SAN moves to the smallest possible representation.
2020-08-15 23:25:43 +02:00
Kai S. K. Engelbart 4cb6e0e08b
Working on SAN serialization of moves
+ SAN generation for castling moves
+ Appending promotion piece symbol in pawn promotion SAN

+ Asking the user to view a generated PGN file
2020-08-15 23:25:42 +02:00
Kai S. K. Engelbart 6cb0da80d7
Created Move#fromSAN, moved implementation from Board 2020-08-15 23:25:41 +02:00
Kai S. K. Engelbart 1dc97ba3de
Added pawn promotion selection
* Letting a NaturalPlayer select the promotion piece with a combo box
* Optimized reflection use in PawnPromotion
* Changed toString method of Move to use LAN

Closes #9
2020-08-15 23:25:38 +02:00
Kai S. K. Engelbart e92664dd07
Added pawn promotion support to LAN 2020-08-15 23:25:37 +02:00
Kai S. K. Engelbart 2821f30dbe
Implemented proper pawn promotion
* Moved move execution and reversion to the Move class
* Removed Move.Type enumeration
* Added Move subclasses Castling, EnPassant and PawnPromotion
* Generating all four possible pawn promotions in the Pawn class
* Temporarily removed special move support from NaturalPlayer
2020-08-15 23:25:36 +02:00
Kai S. K. Engelbart b79c592c67
Created getters for all fields in Move 2020-08-15 23:25:35 +02:00
Kai S. K. Engelbart ae9abded19
Changed class Javadoc to use @author and @since tags 2020-08-15 23:25:30 +02:00
Kai S. K. Engelbart 7138905501
Enhanced FENString class, added unit test and Board#equals() 2020-08-15 23:25:28 +02:00
Kai S. K. Engelbart c16395fe1f
Renamed SAN-like coordinate notation to LAN, added SAN support to Board 2020-08-15 23:25:20 +02:00
Kai S. K. Engelbart b6cfb5674c
Implemented LogFrame updating
+ Export to SAN in move
+ Updating LogFrame after a move
- Turned EventBus into a singleton
2020-08-15 23:25:03 +02:00
Kai S. K. Engelbart 3be4c042bb
Added en passant availability logging and FEN string export 2020-08-15 23:24:53 +02:00
Kai S. K. Engelbart 46b74a527d
First working UCI implementation
+ bestmove, position and go command implementations
+ Move initialization from algebraic notation
+ FEN string generation
2020-08-15 23:24:45 +02:00
Kai S. K. Engelbart 9c19b13785
Added move history and pawn promotion
+ Log class for move history
+ LoggedMove class with piece captured by the logged move
- Made move reversion easier
+ MoveType for recognizing special moves
+ MoveType determination during move generation and validation
2020-08-15 23:24:31 +02:00
Kai S. K. Engelbart e8e040669c
Improved package structure
- Renamed the piece package into board
- Moved Board, Move and Position into the board package
2020-08-15 23:24:25 +02:00