Chess framework built using Java and Swing.
Allows plugins to extend the game by implementing different AI's to play chess.
Use 'gradle run' to initiliaze the game. By default the game will run with no plugins (human vs human).
To create a new plugin, create a new class under the package plugin
and implement the Player
interface under the package core
.
The Player
interface has only two required methods:
Side getSide();
Move chooseMove(Board board);
Return: side (white or black) of the player the plugin is controlling : Side
Parameter: board represting the current state of the game : Board
Return: from the list of available moves from the current chess state, return a move : Move
Observation: 'Board' has a method 'getValidMoves(final Side side)' that takes a 'Side' and returns a list of valid moves for the current side.
Make sure you implement the Player
.
After creating the plugin class, under 'Program'(https://github.com/aoshiro10/chess-framework/blob/master/src/main/java/framework/Program.java) initialize the plugin for a specific player (i.e. 'whitePlayer').
Use 'gradle build' to test framework test
Use 'gradle run' to play chess with the plugin.