Skip to content

bennybebo/JavaChessProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JavaChessProject

This is a Chess application project that implements all the rules of the game and can be played using a GUI.

I decided to choose chess as a project because I have played chess for many years and enjoy it. Additionally, I had no experience creating a GUI in any language and thought that this would be a good opportunity to learn how to make one. Lastly, I had not programmed in Java in over a year and wanted a refresher on the language and OOP as a whole. Along the way I learned about and implemented many different design patterns such as: Decorator, Builder, and Factory. I also gained experience in debugging as there are countless edge cases and exceptions in the game that I had not initially accounted for in my code.

The game is implemented using the Board class. A Board is made up of an ArrayList of 64 Tile's where each Tile represents a spot on the Board that either contains a Piece or is empty. Each Move made on a Board does not augment the existing Board, but instead transitions to a new Board with the appropriate changes made to it. The Builder design pattern was used here to create each new board after a Move is made. By making Move an abstract class, special moves like Castling or EnPassant can extend the class. Additionally, each chess piece and pawn extends from the abstract class Piece. A specific piece will then override the CalculateLegalMoves method with their unique movements and rules. The game ends when a Player is in checkmate which is calculated by determining when a Player has no legal moves left and is in check.

Massive thanks to Software Architecture & Design on YouTube for tutorials and teachings provided.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages