Repository: Mchristos/checkers
Pull request #5: Minimum JDK 17 required
Author: login: Longwater1234
Created: 2025-03-12T14:48:04Z | Merged: 2025-03-13T12:05:55Z

- update to JUnit 5
- minimum requirement is JDK 17
- add "Help" > "About" menu in toolbar
- some minor code cleanup
- add screenshot inside README.md from `resources` foler


Diff:
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/README.md b/README.md
index 4d2c6a2..589b779 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # checkers
 
-A checkers game written in Java/Swing. Requires Java JDK 8 or higher.
+A checkers game written in Java/Swing. Requires Java 17 or higher.
 
 AI implemented using the minimax algorithm and alpha-beta pruning.
 
@@ -13,7 +13,7 @@ AI implemented using the minimax algorithm and alpha-beta pruning.
 - Multiple themes (dark / light from Flatlaf), see [pom.xml](pom.xml)
 
 
-<img width="641" alt="checkers" src="https://user-images.githubusercontent.com/13951953/41507113-c999fad6-7223-11e8-827a-afefd0e318d8.png">
+<img width="641" alt="checkers" src="./src/main/resources/screenshot_checkers.png">
 
 ## Build a runnable JAR
 
diff --git a/TODO.md b/TODO.md
index d24284b..7133ec8 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,9 +1,10 @@
-## TODO  items:
-- x Add yellow highlight on focused piece
-- Add screenshot README from resources folder
-- Add cool themes. (one dark and another light)
-- Add **About** in Help -> give credit to Original author
-- Add **About** in Help -> give credit to THEME creator (flatlaf)
-- README add info about `./mvnw clean package`
-- README add info about Themes
-- Add icon for GUI (`this.setIconImage(...Image)`)
\ No newline at end of file
+## TODO:
+
+- [x] Add yellow highlight on focused piece
+- [x] Add screenshot README from resources folder
+- [ ] Add cool themes. (one dark and another light)
+- [x] Add **About** in Help -> give credit to Original author
+- [ ] Add **About** in Help -> give credit to THEME creator (flatlaf)
+- [x] README add info about `./mvnw clean package`
+- [x] README add info about Themes
+- [ ] Add icon for GUI (`this.setIconImage(...Image)`)
diff --git a/pom.xml b/pom.xml
index 1e4bbd6..1f0e012 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,27 +6,27 @@
 
     <groupId>org.davistiba</groupId>
     <artifactId>Checkers</artifactId>
-    <version>1.0</version>
+    <version>1.0.0</version>
 
     <name>Checkers</name>
-    <!-- FIXME change it to the project's website -->
     <url>https://github.com/Mchristos/checkers</url>
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
     </properties>
 
     <dependencies>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.13.2</version>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <version>5.11.4</version>
             <scope>test</scope>
         </dependency>
+
         <!-- https://mvnrepository.com/artifact/com.formdev/flatlaf -->
-        <!--        CUSTOM THEMES -->
+        <!--    UNCOMMENT ME FOR CUSTOM THEMES -->
         <!--        <dependency>
                     <groupId>com.formdev</groupId>
                     <artifactId>flatlaf</artifactId>
@@ -42,7 +42,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-shade-plugin</artifactId>
-                <version>3.4.1</version>
+                <version>3.5.0</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
@@ -54,7 +54,7 @@
                                 <transformer
                                         implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                     <manifestEntries>
-                                        <Main-Class>org.davistiba.App</Main-Class>
+                                        <Main-Class>org.mchristos.App</Main-Class>
                                         <Build-Number>${maven.build.timestamp}</Build-Number>
                                     </manifestEntries>
                                 </transformer>
diff --git a/src/main/java/org/davistiba/gui/SettingsPanel.java b/src/main/java/org/davistiba/gui/SettingsPanel.java
deleted file mode 100644
index 65252a7..0000000
--- a/src/main/java/org/davistiba/gui/SettingsPanel.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.davistiba.gui;
-
-import org.davistiba.game.Player;
-
-public class SettingsPanel {
-
-    public static Colour AIcolour = Colour.BLACK; // Note: starting player gets white pieces
-    public static boolean helpMode = true;
-    public static boolean hintMode = false;
-    public static boolean dragDrop = false;
-    public static int AiMinPauseDurationInMs = 800;
-    public static int squareSize = 80;
-    public static int checkerWidth = 5 * squareSize / 6;
-    public static int checkerHeight = 5 * squareSize / 6;
-    public static int ghostButtonWidth = 30 * squareSize / 29;
-    public static int ghostButtonHeight = 5 * squareSize / 6;
-
-    /**
-     * Gets the correct colour (black/white) for the given player
-     *
-     * @param player current player
-     * @return the colour
-     */
-    public static Colour getColour(Player player) {
-        Colour result = null;
-        if (player == Player.AI) {
-            result = AIcolour;
-        } else if (player == Player.HUMAN) {
-            result = AIcolour.getOpposite();
-        }
-        if (result == null) {
-            throw new RuntimeException("Null player has no piece.");
-        }
-        return result;
-    }
-}
diff --git a/src/main/java/org/davistiba/App.java b/src/main/java/org/mchristos/App.java
similarity index 84%
rename from src/main/java/org/davistiba/App.java
rename to src/main/java/org/mchristos/App.java
index e2020e1..31985e9 100644
--- a/src/main/java/org/davistiba/App.java
+++ b/src/main/java/org/mchristos/App.java
@@ -1,6 +1,6 @@
-package org.davistiba;
+package org.mchristos;
 
-import org.davistiba.gui.GUI;
+import org.mchristos.gui.GUI;
 
 import javax.swing.*;
 
diff --git a/src/main/java/org/davistiba/game/AI.java b/src/main/java/org/mchristos/game/AI.java
similarity index 93%
rename from src/main/java/org/davistiba/game/AI.java
rename to src/main/java/org/mchristos/game/AI.java
index f781332..a888cec 100644
--- a/src/main/java/org/davistiba/game/AI.java
+++ b/src/main/java/org/mchristos/game/AI.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 import java.util.ArrayList;
 import java.util.concurrent.ThreadLocalRandom;
@@ -13,7 +13,7 @@ public class AI {
     private static final Logger logger = Logger.getLogger(String.valueOf(AI.class));
 
     public AI() {
-        depth = Settings.AI_DEPTH;
+        depth = GlobalSettings.AI_DEPTH;
         player = Player.AI;
     }
 
@@ -35,7 +35,7 @@ public BoardState move(BoardState state, Player player) {
      * Chooses the best successor state based on the minimax algorithm.
      *
      * @param successors list of BoardState
-     * @return
+     * @return best board state
      */
     private BoardState minimaxMove(ArrayList<BoardState> successors) {
         if (successors.size() == 1) {
@@ -64,7 +64,7 @@ private BoardState minimaxMove(ArrayList<BoardState> successors) {
      * Chooses a successor state randomly.
      *
      * @param successors list of BoardState
-     * @return
+     * @return random state
      */
     private BoardState randomMove(ArrayList<BoardState> successors) {
         if (successors.isEmpty()) {
@@ -79,9 +79,9 @@ private BoardState randomMove(ArrayList<BoardState> successors) {
     /**
      * Implements the minimax algorithm with alpha-beta pruning
      *
-     * @param node
-     * @param depth
-     * @return minimax score associated with node
+     * @param node current
+     * @param depth how deep should algorithm go
+     * @return best optimal result
      */
     private int minimax(BoardState node, int depth) {
         // initialize alpha (computed as a max)
@@ -95,11 +95,11 @@ private int minimax(BoardState node, int depth) {
     /**
      * Implements the minimax algorithm with alpha-beta pruning
      *
-     * @param node
+     * @param node current node
      * @param depth
      * @param alpha
      * @param beta
-     * @return
+     * @return best result
      */
     private int minimax(BoardState node, int depth, int alpha, int beta) {
         if (depth == 0 || node.isGameOver()) {
diff --git a/src/main/java/org/davistiba/game/BoardState.java b/src/main/java/org/mchristos/game/BoardState.java
similarity index 95%
rename from src/main/java/org/davistiba/game/BoardState.java
rename to src/main/java/org/mchristos/game/BoardState.java
index d6a8bd0..a4808c2 100644
--- a/src/main/java/org/davistiba/game/BoardState.java
+++ b/src/main/java/org/mchristos/game/BoardState.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -32,7 +32,7 @@ public BoardState() {
      */
     public static BoardState initialState() {
         BoardState bs = new BoardState();
-        bs.turn = Settings.FIRSTMOVE;
+        bs.turn = GlobalSettings.FIRSTMOVE;
         for (int i = 0; i < bs.state.length; i++) {
             int y = i / SIDE_LENGTH;
             int x = i % SIDE_LENGTH;
@@ -73,7 +73,7 @@ private BoardState deepCopy() {
      * @return level
      */
     public int computeHeuristic(Player player) {
-        switch (Settings.HEURISTIC) {
+        switch (GlobalSettings.HEURISTIC) {
             case 1:
                 return heuristic1(player);
             case 2:
@@ -117,12 +117,12 @@ private int pieceScore(Player player) {
     /**
      * Gets valid successor states for a player
      *
-     * @return
+     * @return list of successors
      */
     public ArrayList<BoardState> getSuccessors() {
         // compute jump successors
         ArrayList<BoardState> successors = getSuccessors(true);
-        if (Settings.FORCETAKES) {
+        if (GlobalSettings.FORCETAKES) {
             if (!successors.isEmpty()) {
                 // return only jump successors if available (forced)
                 return successors;
@@ -162,7 +162,7 @@ public ArrayList<BoardState> getSuccessors(boolean jump) {
      * @return list of allowable states
      */
     public ArrayList<BoardState> getSuccessors(int position) {
-        if (Settings.FORCETAKES) {
+        if (GlobalSettings.FORCETAKES) {
             // compute jump successors GLOBALLY
             ArrayList<BoardState> jumps = getSuccessors(true);
             if (!jumps.isEmpty()) {
@@ -315,16 +315,16 @@ private boolean isKingPosition(int pos, Player player) {
     /**
      * Gets the destination position of the most recent move.
      *
-     * @return
+     * @return target position
      */
     public int getToPos() {
         return this.toPos;
     }
 
     /**
-     * Gets the destination position of the most recent move.
+     * Gets the source position of the most recent move.
      *
-     * @return
+     * @return source position
      */
     public int getFromPos() {
         return this.fromPos;
@@ -334,7 +334,7 @@ public int getFromPos() {
     /**
      * Gets the player whose turn it is
      *
-     * @return
+     * @return player's turn
      */
     public Player getTurn() {
         return turn;
@@ -343,7 +343,7 @@ public Player getTurn() {
     /**
      * Is the board in a game over state?
      *
-     * @return
+     * @return true or false
      */
     public boolean isGameOver() {
         return (pieceCount.get(Player.AI) == 0 || pieceCount.get(Player.HUMAN) == 0);
@@ -353,7 +353,7 @@ public boolean isGameOver() {
      * Get player piece at given position.
      *
      * @param i Position in board.
-     * @return
+     * @return piece
      */
     public Piece getPiece(int i) {
         return state[i];
@@ -362,9 +362,9 @@ public Piece getPiece(int i) {
     /**
      * Get piece by grid position
      *
-     * @param y
-     * @param x
-     * @return
+     * @param y position
+     * @param x position
+     * @return piece
      */
     private Piece getPiece(int y, int x) {
         return getPiece(SIDE_LENGTH * y + x);
@@ -373,9 +373,9 @@ private Piece getPiece(int y, int x) {
     /**
      * Check if grid indices are valid
      *
-     * @param y
-     * @param x
-     * @return
+     * @param y position
+     * @param x position
+     * @return true or false
      */
     private boolean isValid(int y, int x) {
         return (0 <= y) && (y < SIDE_LENGTH) && (0 <= x) && (x < SIDE_LENGTH);
diff --git a/src/main/java/org/davistiba/game/Game.java b/src/main/java/org/mchristos/game/Game.java
similarity index 96%
rename from src/main/java/org/davistiba/game/Game.java
rename to src/main/java/org/mchristos/game/Game.java
index d587232..f3ad56b 100644
--- a/src/main/java/org/davistiba/game/Game.java
+++ b/src/main/java/org/mchristos/game/Game.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 import java.util.ArrayList;
 import java.util.Stack;
@@ -11,7 +11,7 @@ public class Game {
     private boolean humanWon;
 
     public Game() {
-        memory = Settings.UNDO_MEMORY;
+        memory = GlobalSettings.UNDO_MEMORY;
         state = new Stack<>();
         state.push(BoardState.initialState());
         ai = new AI();
@@ -65,7 +65,7 @@ public MoveFeedback playerMove(int fromPos, int dx, int dy) {
         return MoveFeedback.UNKNOWN_INVALID;
     }
 
-    public MoveFeedback moveFeedbackClick(int pos) {
+    public MoveFeedback moveFeedbackClick() {
         ArrayList<BoardState> jumpSuccessors = this.state.peek().getSuccessors(true);
         if (!jumpSuccessors.isEmpty()) {
             return MoveFeedback.FORCED_JUMP;
diff --git a/src/main/java/org/davistiba/game/Settings.java b/src/main/java/org/mchristos/game/GlobalSettings.java
similarity index 80%
rename from src/main/java/org/davistiba/game/Settings.java
rename to src/main/java/org/mchristos/game/GlobalSettings.java
index 3818952..1e9919d 100644
--- a/src/main/java/org/davistiba/game/Settings.java
+++ b/src/main/java/org/mchristos/game/GlobalSettings.java
@@ -1,6 +1,6 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
-public class Settings {
+public class GlobalSettings {
     public static boolean FORCETAKES = true; //
     public static Player FIRSTMOVE = Player.HUMAN; // who moves first
     public static int AI_DEPTH = 7;
diff --git a/src/main/java/org/davistiba/game/MoveFeedback.java b/src/main/java/org/mchristos/game/MoveFeedback.java
similarity index 95%
rename from src/main/java/org/davistiba/game/MoveFeedback.java
rename to src/main/java/org/mchristos/game/MoveFeedback.java
index 1eff85f..922e1db 100644
--- a/src/main/java/org/davistiba/game/MoveFeedback.java
+++ b/src/main/java/org/mchristos/game/MoveFeedback.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 public enum MoveFeedback {
     NOT_DIAGONAL("You can only move diagonally."),
diff --git a/src/main/java/org/davistiba/game/Piece.java b/src/main/java/org/mchristos/game/Piece.java
similarity index 70%
rename from src/main/java/org/davistiba/game/Piece.java
rename to src/main/java/org/mchristos/game/Piece.java
index ca49a35..e304a9b 100644
--- a/src/main/java/org/davistiba/game/Piece.java
+++ b/src/main/java/org/mchristos/game/Piece.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 public class Piece {
 
@@ -21,21 +21,17 @@ public Player getPlayer() {
     /**
      * Get possible y-direction movements
      *
-     * @return
+     * @return array of y movements
      */
     public int[] getYMovements() {
         int[] result = new int[]{};
         if (king) {
             result = new int[]{-1, 1};
         } else {
-            switch (player) {
-                case AI:
-                    result = new int[]{1};
-                    break;
-                case HUMAN:
-                    result = new int[]{-1};
-                    break;
-            }
+            result = switch (player) {
+                case AI -> new int[]{1};
+                case HUMAN -> new int[]{-1};
+            };
         }
         return result;
     }
@@ -43,7 +39,7 @@ public int[] getYMovements() {
     /**
      * Get possible x-direction movements
      *
-     * @return
+     * @return array of x movements
      */
     public int[] getXMovements() {
         return new int[]{-1, 1};
diff --git a/src/main/java/org/davistiba/game/Player.java b/src/main/java/org/mchristos/game/Player.java
similarity index 93%
rename from src/main/java/org/davistiba/game/Player.java
rename to src/main/java/org/mchristos/game/Player.java
index bc46a1c..0760355 100644
--- a/src/main/java/org/davistiba/game/Player.java
+++ b/src/main/java/org/mchristos/game/Player.java
@@ -1,4 +1,4 @@
-package org.davistiba.game;
+package org.mchristos.game;
 
 public enum Player {
     AI,
diff --git a/src/main/java/org/davistiba/gui/CheckerButton.java b/src/main/java/org/mchristos/gui/CheckerButton.java
similarity index 95%
rename from src/main/java/org/davistiba/gui/CheckerButton.java
rename to src/main/java/org/mchristos/gui/CheckerButton.java
index 4630f5f..803cda9 100644
--- a/src/main/java/org/davistiba/gui/CheckerButton.java
+++ b/src/main/java/org/mchristos/gui/CheckerButton.java
@@ -1,7 +1,7 @@
-package org.davistiba.gui;
+package org.mchristos.gui;
 
-import org.davistiba.game.Piece;
-import org.davistiba.game.Player;
+import org.mchristos.game.Piece;
+import org.mchristos.game.Player;
 
 import javax.imageio.ImageIO;
 import javax.swing.*;
@@ -12,7 +12,6 @@
 import java.awt.event.MouseMotionAdapter;
 import java.awt.image.BufferedImage;
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.URL;
 
 /**
@@ -121,9 +120,9 @@ protected static URL getImageResource(final String fileName) {
 
     private void setCustomIcon(Piece piece) {
         BufferedImage buttonIcon = null;
-        Colour colour = SettingsPanel.getColour(piece.getPlayer());
+        PieceColour pieceColour = SettingsPanel.getColour(piece.getPlayer());
         try {
-            if (colour == Colour.BLACK) {
+            if (pieceColour == PieceColour.BLACK) {
                 if (piece.isKing()) {
                     buttonIcon = ImageIO.read(getImageResource("images/blackking.png"));
                 } else {
diff --git a/src/main/java/org/davistiba/gui/GUI.java b/src/main/java/org/mchristos/gui/GUI.java
similarity index 91%
rename from src/main/java/org/davistiba/gui/GUI.java
rename to src/main/java/org/mchristos/gui/GUI.java
index 1a280ce..3d3dd7d 100644
--- a/src/main/java/org/davistiba/gui/GUI.java
+++ b/src/main/java/org/mchristos/gui/GUI.java
@@ -1,6 +1,6 @@
-package org.davistiba.gui;
+package org.mchristos.gui;
 
-import org.davistiba.game.*;
+import org.mchristos.game.*;
 
 import javax.swing.*;
 import java.awt.*;
@@ -43,14 +43,18 @@ public GUI() {
         difficultyMapping.put(4, 12);
         this.executor = Executors.newSingleThreadScheduledExecutor();
         MY_HELVETICA = new Font(Font.DIALOG, Font.PLAIN, 12);
-        start();
+        this.start();
     }
 
+    /**
+     * Start the match
+     */
     private void start() {
         settingsPopup();
         game = new Game();
         possibleMoves = new ArrayList<>();
         hintMove = null;
+        System.gc(); // clear up previous match memory
         setup();
         if (SettingsPanel.hintMode) {
             onHintClick();
@@ -87,15 +91,15 @@ private void settingsPopup() {
         slider.setValue(3);
         // force takes option
         JRadioButton forceTakesButton = new JRadioButton("Force Takes");
-        forceTakesButton.setSelected(Settings.FORCETAKES);
+        forceTakesButton.setSelected(GlobalSettings.FORCETAKES);
         // who gets first move?
         ButtonGroup buttonGroup = new ButtonGroup();
         JRadioButton humanFirstRadioButton = new JRadioButton("You Play First");
         JRadioButton aiRadioButton = new JRadioButton("Computer Plays First");
         buttonGroup.add(humanFirstRadioButton);
         buttonGroup.add(aiRadioButton);
-        aiRadioButton.setSelected(Settings.FIRSTMOVE == Player.AI);
-        humanFirstRadioButton.setSelected(Settings.FIRSTMOVE == Player.HUMAN);
+        aiRadioButton.setSelected(GlobalSettings.FIRSTMOVE == Player.AI);
+        humanFirstRadioButton.setSelected(GlobalSettings.FIRSTMOVE == Player.HUMAN);
         // add components to panel
         panel.add(text1);
         panel.add(slider);
@@ -107,10 +111,10 @@ private void settingsPopup() {
                 JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
         // process results
         if (result == JOptionPane.OK_OPTION) {
-            Settings.AI_DEPTH = difficultyMapping.get(slider.getValue());
-            logger.info("Selected AI depth = " + Settings.AI_DEPTH);
-            Settings.FIRSTMOVE = humanFirstRadioButton.isSelected() ? Player.HUMAN : Player.AI;
-            Settings.FORCETAKES = forceTakesButton.isSelected();
+            GlobalSettings.AI_DEPTH = difficultyMapping.get(slider.getValue());
+            logger.info("Selected AI depth = " + GlobalSettings.AI_DEPTH);
+            GlobalSettings.FIRSTMOVE = humanFirstRadioButton.isSelected() ? Player.HUMAN : Player.AI;
+            GlobalSettings.FORCETAKES = forceTakesButton.isSelected();
         } else {
             this.dispose();
             System.exit(0);
@@ -122,12 +126,12 @@ private void settingsPopup() {
      * Sets up initial GUI configuration.
      */
     public void setup() {
-        switch (Settings.FIRSTMOVE) {
+        switch (GlobalSettings.FIRSTMOVE) {
             case AI:
-                SettingsPanel.AIcolour = Colour.WHITE;
+                SettingsPanel.AIcolour = PieceColour.WHITE;
                 break;
             case HUMAN:
-                SettingsPanel.AIcolour = Colour.BLACK;
+                SettingsPanel.AIcolour = PieceColour.BLACK;
                 break;
         }
 
@@ -154,7 +158,7 @@ public void setup() {
         this.pack();
         this.setVisible(true);
         this.setResizable(false);
-        if (Settings.FIRSTMOVE == Player.AI) {
+        if (GlobalSettings.FIRSTMOVE == Player.AI) {
             aiMove();
         }
     }
@@ -270,6 +274,7 @@ public void windowClosing(WindowEvent e) {
         JMenuItem rulesItem = new JMenuItem("Game Rules");
         JMenuItem helpItemHint = new JMenuItem("Hint!");
         JMenuItem helpItemMovables = new JMenuItem("Show movable pieces");
+        JMenuItem aboutItem = new JMenuItem("About");
 
         // add action listeners
         quitItem.addActionListener((e) -> onExitClick());
@@ -280,6 +285,7 @@ public void windowClosing(WindowEvent e) {
         viewItemHintMode.addActionListener(e -> onHintModeClick());
         helpItemHint.addActionListener(e -> onHintClick());
         helpItemMovables.addActionListener(e -> onHelpMovablesClick());
+        aboutItem.addActionListener(e -> onAboutClick());
 
 
         // add components to menu bar
@@ -291,6 +297,7 @@ public void windowClosing(WindowEvent e) {
         helpMenu.add(helpItemHint);
         helpMenu.add(helpItemMovables);
         helpMenu.add(rulesItem);
+        helpMenu.add(aboutItem);
         menuBar.add(fileMenu);
         menuBar.add(editMenu);
         menuBar.add(viewMenu);
@@ -351,7 +358,7 @@ private void onPieceClick(ActionEvent actionEvent) {
                 possibleMoves = game.getValidMoves(pos);
                 updateCheckerBoard();
                 if (possibleMoves.isEmpty()) {
-                    MoveFeedback feedback = game.moveFeedbackClick(pos);
+                    MoveFeedback feedback = game.moveFeedbackClick();
                     updateText(feedback.toString());
                     if (feedback == MoveFeedback.FORCED_JUMP) {
                         // show movable jump pieces
@@ -417,7 +424,7 @@ private void invokeAiUpdate() {
      * Open dialog for restarting the program.
      */
     private void onRestartClick() {
-        Object[] options = {"Yes", "No"};
+        String[] options = {"Yes", "No"};
         int n = JOptionPane.showOptionDialog(this, "Are you sure you want to restart?",
                 "Restart game? ",
                 JOptionPane.YES_NO_OPTION,
@@ -426,7 +433,7 @@ private void onRestartClick() {
                 options,
                 options[1]);
         if (n == 0) {
-            start();
+            this.start();
         }
     }
 
@@ -434,7 +441,7 @@ private void onRestartClick() {
      * Open dialog for quitting the program
      */
     private void onExitClick() {
-        Object[] options = {"Yes", "No"};
+        String[] options = {"Yes", "No"};
         int n = JOptionPane.showOptionDialog(this,
                 "\nAre you sure you want to leave?",
                 "Quit game? ",
@@ -479,6 +486,17 @@ private void onRulesClick() {
                 JOptionPane.INFORMATION_MESSAGE);
     }
 
+    private void onAboutClick() {
+        JOptionPane.showMessageDialog(this,
+                "<html><body><p style='width: 400px;'>" +
+                        "<p>Checkers with AI</p>" +
+                        "<p>(c) 2018, by chris Mchristos </p>" +
+                        "<a href='https://github.com/mchristos/checkers'>https://github.com/mchristos/checkers</a>"
+                        + "</p></body></html>",
+                "Game Rules",
+                JOptionPane.INFORMATION_MESSAGE);
+    }
+
     private static String getRulesList() {
         return new StringBuilder()
                 .append("1. Moves are allowed only on the dark squares, so pieces always move diagonally. Single ")
diff --git a/src/main/java/org/davistiba/gui/GhostButton.java b/src/main/java/org/mchristos/gui/GhostButton.java
similarity index 94%
rename from src/main/java/org/davistiba/gui/GhostButton.java
rename to src/main/java/org/mchristos/gui/GhostButton.java
index d708c01..02f4959 100644
--- a/src/main/java/org/davistiba/gui/GhostButton.java
+++ b/src/main/java/org/mchristos/gui/GhostButton.java
@@ -1,13 +1,12 @@
-package org.davistiba.gui;
+package org.mchristos.gui;
 
-import org.davistiba.game.BoardState;
+import org.mchristos.game.BoardState;
 
 import javax.imageio.ImageIO;
 import javax.swing.*;
 import java.awt.*;
 import java.awt.image.BufferedImage;
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.URL;
 
 /**
diff --git a/src/main/java/org/davistiba/gui/Colour.java b/src/main/java/org/mchristos/gui/PieceColour.java
similarity index 70%
rename from src/main/java/org/davistiba/gui/Colour.java
rename to src/main/java/org/mchristos/gui/PieceColour.java
index 2fbade8..89f4cf5 100644
--- a/src/main/java/org/davistiba/gui/Colour.java
+++ b/src/main/java/org/mchristos/gui/PieceColour.java
@@ -1,11 +1,11 @@
-package org.davistiba.gui;
+package org.mchristos.gui;
 
-public enum Colour {
+public enum PieceColour {
     WHITE,
     BLACK;
 
-    public Colour getOpposite() {
-        Colour result = null;
+    public PieceColour getOpposite() {
+        PieceColour result = null;
         if (this == WHITE) {
             result = BLACK;
         } else if (this == BLACK) {
diff --git a/src/main/java/org/mchristos/gui/SettingsPanel.java b/src/main/java/org/mchristos/gui/SettingsPanel.java
new file mode 100644
index 0000000..88c7956
--- /dev/null
+++ b/src/main/java/org/mchristos/gui/SettingsPanel.java
@@ -0,0 +1,36 @@
+package org.mchristos.gui;
+
+import org.mchristos.game.Player;
+
+public class SettingsPanel {
+
+    public static PieceColour AIcolour = PieceColour.BLACK; // Note: starting player gets white pieces
+    public static boolean helpMode = true;
+    public static boolean hintMode = false;
+    public static boolean dragDrop = false;
+    public static final int AiMinPauseDurationInMs = 800;
+    public static final int squareSize = 80;
+    public static final int checkerWidth = 5 * squareSize / 6;
+    public static final int checkerHeight = 5 * squareSize / 6;
+    public static final int ghostButtonWidth = 30 * squareSize / 29;
+    public static final int ghostButtonHeight = 5 * squareSize / 6;
+
+    /**
+     * Gets the correct colour (black/white) for the given player
+     *
+     * @param player current player
+     * @return the colour
+     */
+    public static PieceColour getColour(Player player) {
+        PieceColour result = null;
+        if (player == Player.AI) {
+            result = AIcolour;
+        } else if (player == Player.HUMAN) {
+            result = AIcolour.getOpposite();
+        }
+        if (result == null) {
+            throw new RuntimeException("Null player has no piece.");
+        }
+        return result;
+    }
+}
diff --git a/src/main/java/org/davistiba/gui/SquarePanel.java b/src/main/java/org/mchristos/gui/SquarePanel.java
similarity index 96%
rename from src/main/java/org/davistiba/gui/SquarePanel.java
rename to src/main/java/org/mchristos/gui/SquarePanel.java
index 124947c..9ecd885 100644
--- a/src/main/java/org/davistiba/gui/SquarePanel.java
+++ b/src/main/java/org/mchristos/gui/SquarePanel.java
@@ -1,4 +1,4 @@
-package org.davistiba.gui;
+package org.mchristos.gui;
 
 import javax.swing.*;
 import java.awt.*;
diff --git a/src/main/resources/screenshot_checkers.png b/src/main/resources/screenshot_checkers.png
new file mode 100644
index 0000000..4772c63
Binary files /dev/null and b/src/main/resources/screenshot_checkers.png differ
diff --git a/src/test/java/org/davistiba/gui/CheckerButtonTest.java b/src/test/java/org/davistiba/gui/CheckerButtonTest.java
deleted file mode 100644
index 50240ce..0000000
--- a/src/test/java/org/davistiba/gui/CheckerButtonTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.davistiba.gui;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
-
-@RunWith(value = Parameterized.class)
-public class CheckerButtonTest {
-
-    @Parameterized.Parameter
-    public String fileName;
-
-    @Parameterized.Parameters(name = "{index}: checkFile {0}")
-    public static Collection<Object[]> data() {
-        return Arrays.asList(new Object[][]{
-                {"images/blackchecker.gif"},
-                {"images/blackking.png"},
-                {"images/whiteking.png"},
-                {"images/whitechecker.gif"}
-        });
-    }
-
-    @Test
-    public void test_getImageResource() {
-        URL path = CheckerButton.getImageResource(fileName);
-        Assert.assertNotNull("Image file missing", path);
-    }
-
-
-}
\ No newline at end of file
diff --git a/src/test/java/org/davistiba/AppTest.java b/src/test/java/org/mchristos/AppTest.java
similarity index 54%
rename from src/test/java/org/davistiba/AppTest.java
rename to src/test/java/org/mchristos/AppTest.java
index 9691939..135e34e 100644
--- a/src/test/java/org/davistiba/AppTest.java
+++ b/src/test/java/org/mchristos/AppTest.java
@@ -1,8 +1,7 @@
-package org.davistiba;
+package org.mchristos;
 
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit test for simple App.
@@ -13,6 +12,7 @@ public class AppTest {
      */
     @Test
     public void shouldAnswerWithTrue() {
-        assertTrue(true);
+        Assertions.assertTrue(true);
+
     }
 }
diff --git a/src/test/java/org/mchristos/gui/CheckerButtonTest.java b/src/test/java/org/mchristos/gui/CheckerButtonTest.java
new file mode 100644
index 0000000..a3c7ed7
--- /dev/null
+++ b/src/test/java/org/mchristos/gui/CheckerButtonTest.java
@@ -0,0 +1,28 @@
+package org.mchristos.gui;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.net.URL;
+import java.util.stream.Stream;
+
+public class CheckerButtonTest {
+
+    public static Stream<Arguments> data() {
+        return Stream.of(
+                Arguments.of("images/blackchecker.gif"),
+                Arguments.of("images/blackking.png"),
+                Arguments.of("images/whiteking.png"),
+                Arguments.of("images/whitechecker.gif")
+        );
+    }
+
+    @ParameterizedTest(name = "{index}: checkFile {0}")
+    @MethodSource("data")
+    public void test_getImageResource(String fileName) {
+        URL path = CheckerButton.getImageResource(fileName);
+        Assertions.assertNotNull(path, "Image file missing");
+    }
+}
\ No newline at end of file


Reviews:
user: login: Mchristos
body: Looks good other than that small comment on docs / comments
state: APPROVED
author_association: OWNER
submitted_at: 2025-03-13T10:54:53Z
user: login: Longwater1234
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-13T11:25:02Z
user: login: Mchristos
state: APPROVED
author_association: OWNER
submitted_at: 2025-03-13T12:05:37Z

Review comments:
diff_hunk: @@ -95,11 +95,11 @@ private int minimax(BoardState node, int depth) {
     /**
      * Implements the minimax algorithm with alpha-beta pruning
      *
-     * @param node
-     * @param depth
-     * @param alpha
-     * @param beta
-     * @return
+     * @param node current node
+     * @param depth param alpha
path: src/main/java/org/mchristos/game/AI.java
user: login: Mchristos
body: Should be depth? 
created_at: 2025-03-13T10:30:27Z
author_association: OWNER
diff_hunk: @@ -95,11 +95,11 @@ private int minimax(BoardState node, int depth) {
     /**
      * Implements the minimax algorithm with alpha-beta pruning
      *
-     * @param node
-     * @param depth
-     * @param alpha
-     * @param beta
-     * @return
+     * @param node current node
+     * @param depth param alpha
path: src/main/java/org/mchristos/game/AI.java
user: login: Mchristos
body: i.e. `* @param depth param depth`. Why the redundancy btw? 
created_at: 2025-03-13T10:47:57Z
author_association: OWNER
diff_hunk: @@ -95,11 +95,11 @@ private int minimax(BoardState node, int depth) {
     /**
      * Implements the minimax algorithm with alpha-beta pruning
      *
-     * @param node
-     * @param depth
-     * @param alpha
-     * @param beta
-     * @return
+     * @param node current node
+     * @param depth param alpha
path: src/main/java/org/mchristos/game/AI.java
user: login: Longwater1234
body: ok let me remove these comments. 
created_at: 2025-03-13T11:25:02Z
author_association: COLLABORATOR

PR comments:
user: login: Longwater1234
created_at: 2025-03-12T14:55:12Z
body: @Mchristos Please review this pull request
author_association: COLLABORATOR
user: login: Mchristos
created_at: 2025-03-12T15:02:21Z
body: > @Mchristos Please review this pull request

@Longwater1234 thanks for the PR! I noticed the folder structure includes `java/org/davistiba` is that needed, seems that name is personal to you? 

I haven't used Java in ages so I know very little about the ecosystem / tooling etc. 
author_association: OWNER
user: login: Longwater1234
created_at: 2025-03-12T15:03:51Z
body: Oh yes, you are correct. Wait, I will rename it to your name, mchristos, and commit. @Mchristos 
author_association: COLLABORATOR
user: login: Longwater1234
created_at: 2025-03-12T15:29:46Z
body: @Mchristos Done migrated to your name. You can preview if you can run it 
author_association: COLLABORATOR
user: login: Longwater1234
created_at: 2025-03-13T11:30:21Z
body: @Mchristos Ok i have removed redudant javadoc comments, please review again
author_association: COLLABORATOR