Checkers Game:

Checkers is a strategy board game for two players which involve diagonal moves of uniform game pieces and mandatory captures by jumping over opponent pieces. It is played by two opponents, on opposite sides of the 8x8 checkered gameboard. One player has the dark pieces (or 'x' tokens); the other has the light pieces (or o tokens). Each player has 12 pieces. Players alternate turns. A player may not move an opponent's piece. A move consists of moving a piece diagonally to an adjacent unoccupied square. If the adjacent square contains an opponent's piece, and the square immediately beyond it is vacant, the piece may be captured (and removed from the game) by jumping over it.

Figure: see image.

Only the dark squares of the checkered board are used. A piece may move only diagonally into an unoccupied square. The player without pieces remaining, or who cannot move due to being blocked, loses the game. Pieces move one step diagonally forwards, and capture an opponent's piece by moving two consecutive steps in the same line, jumping over the piece on the first step. Multiple enemy pieces can be captured in a single turn provided this is done by successive jumps made by a single piece; the jumps do not need to be in the same line and may "zigzag" (change diagonal direction). Pieces can move/jump only in forward direction.

Aim of the game: is to capture all the opponent's pieces or render them unable to move.

How the game ends:

  • The first player to lose all of his or her pieces loses the game.
  • If a player is put in a position where they cannot move, they lose.

Reference: https://simple.wikipedia.org/wiki/Checkers

Program Requirements:

To the previously developed Java-based Checkers game, add a module to provide a graphical user interface (GUI) using JavaFX or Java Swing. Create a separate class called CheckersGui.java in the ui package that generates the GUI.

  • Continue to make use of good Object-Oriented design
  • Provide documentation using Javadoc and appropriate comments in your code.
  • Generate HTML documentation using Javadoc tool
  • Make sure you provide appropriate Exception Handling (using try-catch blocks) throughout the program
  • You can decide on the layout of the user interface and game board.
  • At the start of the program,
    • Ask the user if they would like a GUI or console-based UI. Then show the corresponding UI.
    • Next, ask if they want to play against a computer or another player and respond accordingly.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.