Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clemenscodes/chess
MVC Chess GUI using Java and bitboards
https://github.com/clemenscodes/chess
bitboards chess controlp5 java junit5 mvc-pattern processing
Last synced: 19 days ago
JSON representation
MVC Chess GUI using Java and bitboards
- Host: GitHub
- URL: https://github.com/clemenscodes/chess
- Owner: clemenscodes
- Created: 2023-12-11T14:16:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-23T08:58:06.000Z (2 months ago)
- Last Synced: 2024-10-27T18:34:39.156Z (2 months ago)
- Topics: bitboards, chess, controlp5, java, junit5, mvc-pattern, processing
- Language: Java
- Homepage:
- Size: 22.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chess MVC
## Overview
This is a fully functioning MVC Chess GUI written in Java.
It leverages the Processing library for the graphical user interface,
ControlP5 for buttons, and
JUnit for testing.The chess logic is implemented using [bitboards](https://www.chessprogramming.org/Bitboards) with a little endian rank file mapping board representation.
All chess rules are implemented including castling king and queenside, en passant, pawn promotions and draw by 75 move rule.All the techniques used to implement this chess game are documented in the [chess programming wiki](https://www.chessprogramming.org/Main_Page).
### Architecture
The code is structured as a monorepo with the following projects and dependencies.
![](assets/graph.png)
## Screenshots
![](assets/initial.png)
### New game
![](assets/start.png)
### Highlighted source square
![](assets/highlighted.png)
### Legal moves per piece
![](assets/possiblemoves.png)
### Error feedback
![](assets/error.png)
### Draw offers
![](assets/drawoffer.png)
![](assets/acceptdrawoffer.png)
![](assets/accepteddraw.png)### Castling
![](assets/kingcastle.png)
![](assets/queencastle.png)### Pawn promotions
![](assets/queenpromotion.png)
![](assets/rookpromotion.png)
![](assets/rookpromotionresult.png)### Resignations
![](assets/whiteresign.png)
![](assets/blackresign.png)### Checkmate
![](assets/checkmate.png)
![](assets/wcheckmate.png)## Requirements
- jdk 21
- node
- pnpm## Getting started
### 1. Clone the repository
```sh
git clone https://github.com/clemenscodes/chess.git
cd chess
```### 2. Install build dependencies
```sh
pnpm install
```### 3. Start
```sh
pnpm start
```### Alternative
Using an IDE like IntelliJ will also build and start the project without additional configuration.
## JShell e2e testing
To test the model using the jshell, simply run the jshell script:
```sh
pnpm jshell
```or manually:
```sh
jshell --class-path dist/api:dist/model --startup e2e/model.jshell
```## Javadoc
```sh
pnpm run docs
```