Commit Graph

140 Commits

Author SHA1 Message Date
d46a9aa5ff
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
2020-08-15 23:25:48 +02:00
9a4d9121de
Improved close button UI 2020-08-15 23:25:48 +02:00
baf55a4c96
Added simple close button to tab component 2020-08-15 23:25:47 +02:00
c6db7da698
Added custom tab component 2020-08-15 23:25:46 +02:00
9b71dbeb82
Fixed setter parameter naming for fullmove number in Log 2020-08-15 23:25:45 +02:00
00bf4a44ea
Fixed missing end of line chunk in movetext 2020-08-15 23:25:45 +02:00
ac1c857795
Fixed fullmove counters in PGN export 2020-08-15 23:25:44 +02:00
739c51f265
Including fullmove counters in PGN export 2020-08-15 23:25:43 +02:00
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
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
6cb0da80d7
Created Move#fromSAN, moved implementation from Board 2020-08-15 23:25:41 +02:00
4dfd218440
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
2020-08-15 23:25:41 +02:00
d6b5442ee9
Added empty save methods to PGNDatabase and PGNGame 2020-08-15 23:25:40 +02:00
e070bb584f
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
2020-08-15 23:25:39 +02:00
6824b46539
Using reflection in FENString, fixed input field in MainWindow 2020-08-15 23:25:39 +02:00
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
e92664dd07
Added pawn promotion support to LAN 2020-08-15 23:25:37 +02:00
17677e6858
Removed Type enumeration from Piece class 2020-08-15 23:25:37 +02:00
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
b79c592c67
Created getters for all fields in Move 2020-08-15 23:25:35 +02:00
9aea4bd9d4
Moved board evaluation logic to MoveProcessor 2020-08-15 23:25:35 +02:00
acf6bf36c1
Added RestartEvent to clear move list after game restart 2020-08-15 23:25:34 +02:00
aa09674791
Fully implemented castling conditions
Closes #8
2020-08-15 23:25:33 +02:00
4f19244d40
Implemented 'go' command in UCI protocol
Closes #5
2020-08-15 23:25:33 +02:00
f7d1758b28
Implemented 'position moves' command in UCI protocol 2020-08-15 23:25:32 +02:00
05299e3a05
Implemented 'currline' command in UCI protocol 2020-08-15 23:25:31 +02:00
ae9abded19
Changed class Javadoc to use @author and @since tags 2020-08-15 23:25:30 +02:00
de015a64fb
Moved loadFile method to MainWindow, removed redundancies 2020-08-15 23:25:30 +02:00
966c959786
Removed old FEN string methods, fixed FEN regex 2020-08-15 23:25:29 +02:00
3821ce313d
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
2020-08-15 23:25:28 +02:00
7138905501
Enhanced FENString class, added unit test and Board#equals() 2020-08-15 23:25:28 +02:00
3603153254
Added FENString class 2020-08-15 23:25:27 +02:00
41b75d415d
Renamed FEN string fullmove counter to fullmove number 2020-08-15 23:25:26 +02:00
141ca7ba26
Created io package, moved IO-related classes 2020-08-15 23:25:26 +02:00
e4daec64b1
Added PGNDatabaseTest and test file 2020-08-15 23:25:25 +02:00
258db80f36
Replaced game configuration dialog by a JOptionPane 2020-08-15 23:25:24 +02:00
cbf110c28d
Improved PGN parsing, added PGN file loading 2020-08-15 23:25:24 +02:00
86b696ef4c
Implemented game loading from FEN file 2020-08-15 23:25:23 +02:00
a0b4405976
Added file chooser dialog, renamed GameConfigurationDialog to DialogUtil 2020-08-15 23:25:22 +02:00
a76e3cc904
Replaced LogPanel by a JList inside GamePane with a custom cell renderer 2020-08-15 23:25:22 +02:00
3bb4fd211c
Fixed texture scaling method in TextureUtil 2020-08-15 23:25:21 +02:00
4e1682ac16
Added PGNDatabase and PGNGame classes with support for PGN parsing 2020-08-15 23:25:20 +02:00
c16395fe1f
Renamed SAN-like coordinate notation to LAN, added SAN support to Board 2020-08-15 23:25:20 +02:00
dfa3874dcf
Added ChessException class 2020-08-15 23:25:19 +02:00
9c6faae6ba
Moved MoveNode into a separate file 2020-08-15 23:25:18 +02:00
ff3f064a7f
Fixed LogPanel to support new log data model 2020-08-15 23:25:17 +02:00
69261303c5
Fixed memory leak, improved copy constructors 2020-08-15 23:25:17 +02:00
06ab01f585
Fixed Log with respect to variations 2020-08-15 23:25:16 +02:00
1723c44524
Added variations in Log, added LogTest 2020-08-15 23:25:15 +02:00
7258e96b1a
Changed unit test package structure
- Changed unit test package structure to match src
- Refactored PositionTest
+ TestToString method in PositionTest
2020-08-15 23:25:15 +02:00