Commit Graph

149 Commits

Author SHA1 Message Date
d56ed98304 Remove AIConfigDialog, simplify some lambdas 2020-05-16 22:43:17 +02:00
9fb60ab0ae Refactor for efficiency and concise code
* Change player map implentation in Game to EnumMap
* Add proper toString methods to Piece and MoveNode
* Compact code in MainWindow
* Synchronize methods in Game
2020-05-16 16:10:44 +02:00
f7c1be3404 Add missing Javadoc 2020-05-16 16:09:13 +02:00
0968fddce0 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-01-06 15:03:20 +02:00
cb4f44539a Fixed some Javadoc and formatting 2019-12-21 21:42:36 +01:00
b6dd75b979 Implemented saving the last accessed file system path
When loading or saving a game file, the file chooser dialog opens inside
the directory that has been last accessed by the user. In case of no
previous access, the home directory is used instead.

Closes #14
2019-12-11 22:08:43 +01:00
8cdaee349f
Merge pull request #17 from CyB3RC0nN0R/f/close_tabs
Implementing a closing button for game pane tabs
2019-12-11 21:26:38 +01:00
7008ad65aa Improved close button UI 2019-12-11 21:23:35 +01:00
cb79cc3159 Added simple close button to tab component 2019-12-11 14:11:24 +01:00
17d2080e27 Added custom tab component 2019-12-11 14:02:31 +01:00
d34fe05cc6
Merge pull request #16 from CyB3RC0nN0R/f/pgn_save
Implemented game serialization to the PGN format
2019-12-11 07:53:46 +01:00
d0cfa4c1ff Fixed setter parameter naming for fullmove number in Log 2019-12-11 07:53:44 +01:00
3e5d584e6f Fixed missing end of line chunk in movetext 2019-12-11 07:45:39 +01:00
1fd1540d60 Fixed fullmove counters in PGN export 2019-12-10 21:27:06 +01:00
546b818345 Including fullmove counters in PGN export 2019-12-08 22:15:29 +01:00
719e4f99ef 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.
2019-12-06 23:54:11 +01:00
927d5ed254 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
2019-11-24 21:31:32 +01:00
21199dede5 Created Move#fromSAN, moved implementation from Board 2019-11-19 06:30:53 +01:00
cf5b507f00 Added a PGN file saving routine
+ showFileSaveDialog in DialogUtil
+ Javadoc in Log and PGNDatabase
+ "Save game file" button in MenuBar
+ saveFile method in MainWindow
+ Formatting and result tag in PGNGame tag pair serialization
2019-11-08 15:22:12 +01:00
12f6f7f0ef Added empty save methods to PGNDatabase and PGNGame 2019-11-07 05:53:28 +01:00
39e40e8c2e Fixed color switching button
* Renamed RestartEvent to GameStartEvent
* Moved event trigger to Game
* Renamed GameState to BoardState
* Added BoardState instance to MoveEvent
* Disabling the color switching button when a checkmate or stalemate is
reached

Fixes #1
2019-11-06 19:52:52 +01:00
198267c3b1 Using reflection in FENString, fixed input field in MainWindow 2019-11-05 05:51:41 +01:00
f70cd85f2c
Merge pull request #11 from CyB3RC0nN0R/f/pawn_promotion
Added pawn promotion
2019-11-05 05:44:11 +01:00
86a1c70eda 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
2019-11-05 05:41:26 +01:00
5b99370884 Added pawn promotion support to LAN 2019-11-04 18:11:23 +01:00
e955f05016 Removed Type enumeration from Piece class 2019-11-04 05:51:11 +01:00
71f48895df 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
2019-11-03 15:46:08 +01:00
0edb83087b Created getters for all fields in Move 2019-10-31 19:09:43 +01:00
3e7f379196 Moved board evaluation logic to MoveProcessor 2019-10-30 17:11:57 +01:00
3eb292b589 Added RestartEvent to clear move list after game restart 2019-10-30 06:12:31 +01:00
2fb917c1c6 Fully implemented castling conditions
Closes #8
2019-10-29 06:24:44 +01:00
d3d721a41b Implemented 'go' command in UCI protocol
Closes #5
2019-10-28 18:54:00 +01:00
4e64e16fa7 Implemented 'position moves' command in UCI protocol 2019-10-28 18:31:18 +01:00
43d9fec0f2 Implemented 'currline' command in UCI protocol 2019-10-28 18:24:26 +01:00
caff59741c Changed class Javadoc to use @author and @since tags 2019-10-26 07:55:21 +02:00
85a8bf817f
Merge pull request #7 from CyB3RC0nN0R/feature/io
Refined IO functionality, fixed FEN string serialization and deserialization
2019-10-25 17:01:55 +02:00
ada382aee6 Moved loadFile method to MainWindow, removed redundancies 2019-10-25 16:58:18 +02:00
5f6e2e514f Removed old FEN string methods, fixed FEN regex 2019-10-25 11:52:48 +02:00
208f585c11 Moved castling right logging to Log
* Removed move counter from Piece
* Added castling right array to MoveNode and Log
* Removed castling right map from Board
* Added castling right serialization and deserialization to FENString
* Modified LogTest
2019-10-25 11:34:07 +02:00
de18ec5759 Enhanced FENString class, added unit test and Board#equals() 2019-10-24 19:54:59 +02:00
47db284b9b Added FENString class 2019-10-24 06:09:16 +02:00
73f5e17405 Renamed FEN string fullmove counter to fullmove number 2019-10-22 21:25:06 +02:00
40a3a92686 Added PGNDatabaseTest and test file 2019-10-21 21:45:38 +02:00
1ed43dd180 Created io package, moved IO-related classes 2019-10-20 17:27:52 +02:00
0148fbe570 Replaced game configuration dialog by a JOptionPane 2019-10-20 11:51:56 +02:00
84158c2dac Improved PGN parsing, added PGN file loading 2019-10-20 11:22:58 +02:00
02a4b3ee32 Implemented game loading from FEN file 2019-10-18 17:45:13 +02:00
c31bfca497 Added file chooser dialog, renamed GameConfigurationDialog to DialogUtil 2019-10-14 06:31:03 +02:00
90437e822b Replaced LogPanel by a JList inside GamePane with a custom cell renderer 2019-10-13 21:34:22 +02:00
0d654571a1 Fixed texture scaling method in TextureUtil 2019-10-13 14:37:35 +02:00