Skip to content

kduncanhsu/checkers-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

Checkers Game

This is my implementation of the popular checkers board game using Java Swing.

Overview of Classes

CheckersModel: This class maintains the current state of the board. It contains all the logic for whether a move/jump is valid, and the game has ended/winner is found. It stores the LinkedList of all versions of the board as well as the method for the undo feature. It also contains the methods for saving and loading the game.

GameBoard: This class instantiates a CheckersModel object, which is the model for the game. This class handles user clicks–the model is updated every time the user clicks the game board. Whenever the model is updated, the game board repaints itself and updates the message at the bottom of the window.

RunCheckers: This class instantiates a GameBoard object, and sets up the top-level frame and widgets for the GUI. This class implements controller functionality with the various buttons such as Reset, Undo, Save, Load, and Instructions.

Game: Runs the main game

Java Features Implemented

  1. 2D Arrays
  2. Collections (LinkedLists, Maps)
  3. File I/O
  4. JUnit Testing

Execution Instructions

cd main
Java Game.java

About

checkers-game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages