Fixed some Javadoc and formatting

This commit is contained in:
Kai S. K. Engelbart 2019-12-21 21:42:36 +01:00
parent d46a9aa5ff
commit b32a4f2414
Signed by: kske
GPG Key ID: 8BEB13EC5DF7EF13
2 changed files with 14 additions and 15 deletions

View File

@ -30,11 +30,13 @@ public class Board {
/**
* Creates a copy of another {@link Board} instance.<br>
* The created object is a deep copy, but does not contain any move history
* apart from the current {@link MoveNode}.
* The created object is a deep copy, and can optionally contain the move
* history of the Board to copy.
*
* @param other The {@link Board} instance to copy
* @param copyVariations TODO
* @param other The Board instance to copy
* @param copyVariations if set to {@code true}, the {@link Log} object of the
* other Board instance is copied with its entire move
* history
*/
public Board(Board other, boolean copyVariations) {
for (int i = 0; i < 8; i++)
@ -99,9 +101,7 @@ public class Board {
*
* @param sanMove The move to execute in SAN (Standard Algebraic Notation)
*/
public void move(String sanMove) {
move(Move.fromSAN(sanMove, this));
}
public void move(String sanMove) { move(Move.fromSAN(sanMove, this)); }
/**
* Reverts the last move and removes it from the log.

View File

@ -44,9 +44,7 @@ public class GamePane extends JComponent {
private Game game;
private Color activeColor;
private JPanel moveSelectionPanel;
private JButton btnNext;
private JButton btnFirst;
private JButton btnLast;
private JButton btnFirst, btnPrevious, btnNext, btnLast;
public GamePane() {
activeColor = Color.WHITE;
@ -96,9 +94,9 @@ public class GamePane extends JComponent {
btnFirst.setEnabled(false);
moveSelectionPanel.add(btnFirst);
JButton btnPreviousMove = new JButton("Previous");
btnPreviousMove.setEnabled(false);
moveSelectionPanel.add(btnPreviousMove);
btnPrevious = new JButton("Previous");
btnPrevious.setEnabled(false);
moveSelectionPanel.add(btnPrevious);
btnNext = new JButton("Next");
btnNext.setEnabled(false);
@ -107,6 +105,7 @@ public class GamePane extends JComponent {
btnLast = new JButton("Last");
btnLast.setEnabled(false);
moveSelectionPanel.add(btnLast);
boardPane = new BoardPane();
GridBagConstraints gbc_boardPane = new GridBagConstraints();
gbc_boardPane.fill = GridBagConstraints.BOTH;