top of page
Chess Game

Basic Chess Engine

  • Worked on a basic chess engine done in JAVA console.

  • Using proper code structure and Object Oriented design principles like:

    • Program to an interface, not an implementation​

    • Favor composition over inheritance

  • Created basic UML diagram roughly for better representation​

​

Github Repo: https://github.com/JoAMD/Basic-Chess-Engine

Videos

Instructions and Code

Here you can see the rough UML diagram given which shows the composition and aggregation between the classes

 

Chess UML (5).png

Here we have the abstract class Piece. It implements some important methods like makeMove.

The method canMove is abstract since the subclasses implement this functionality.

 

Here we have a concrete subclass of Piece which implements the canMove method. In this way we abstract the necessary part out. In other classes with the game logic, we only use the abstract class Piece to keep the references of all the concrete piece classes like King, Rook, Bishop etc. This is in line with the OO Design Principle, "Program to an interface, not an implementation​"

Project Gallery

< Previous Project
Next Project >
bottom of page