This repository contains a student chess project created for an ongoing lecture on object-oriented programming with Java at HWR Berlin (summer term 2024).
⚠️ This code is for educational purposes only. Do not rely on it!
Installed:
- IDE of your choice (e.g. IntelliJ IDEA)
- JDK of choice installed (e.g. through IntelliJ IDEA)
- Maven installed (e.g. through IntelliJ IDEA)
- Git installed
This project uses Apache Maven as build tool.
To build from your shell (without an additional local installation of Maven), ensure that ./mvnw
is executable:
chmod +x ./mvnw
I recommend not to dive into details about Maven at the beginning.
Instead, you can use just to build the project.
It reads the repositories justfile
which maps simplified commands to corresponding sensible Maven
calls.
With just installed, you can simply run this command to perform a build of this project and run all of its tests:
just build
Chess game, programmed by 4 students at HWR Berlin in OOP Lecture.
- chess logic
- cli
- persistance
- testing exceptions
- writing into a csv-file
If chess
does not work in your terminal, try ./chess
or .\chess
instead.
Command | Description | Example |
---|---|---|
help |
shows all commands | help |
new_game |
creates a new game | new_game |
on game <ID> state |
shows the game state | on game 1337 state |
on game <ID> player <COLOR> moves <OLD_POS> to <NEW_POS> |
play on a game | on game 1673 player black moves a1 to a8 |
Number | Feature | Implemented | Tested |
---|---|---|---|
1 | Chessboard | ✔️ | ✔️ |
2 | Pieces | ✔️ | ✔️ |
3 | Movement | ✔️ | ✔️ |
4 | Check | ✔️ | ✔️ |
5 | Checkmate | ✔️ | ✔️ |
6 | Game | ✔️ | ✔️ |
7 | FEN Notation | ✔️ | ✔️ |
Number | Feature | Implemented | Tested |
---|---|---|---|
1 | New Game | ✔️ | ✔️ |
2 | Play on Board | ✔️ | ✔️ |
3 | Game state | ✔️ | ✔️ |
4 | Help | ✔️ | ✔️ |
Number | Feature | Implemented | Tested |
---|---|---|---|
1 | Save Game | ✔️ | ✔️ |
2 | Load Game | ✔️ | ✔️ |
2 | Delete Game | ✔️ | ✔️ |
Number | Dependency Name | Dependency Description | Why is it necessary? |
---|---|---|---|
1 | ❌ | ❌ | ❌ |
Your local repository should have a reference to both the fork (your own remote repository)
and the original remote repository.
To configure your git remote repositories, use the git remote
command set.
- Clone your fork and go enter the repository.
git clone <fork-url>
cd <created-folder>
- Now your fork is configured as primary remote repository (origin). Next to origin, you should add the original repository as a second remote repository (upstream).
git remote add upstream <repository-url>
- Verify that both remotes are configured correctly. The following command should list both remotes: origin and upstream.
git remote -v
- To fetch changes from all remote repositories, use:
git fetch --all
- If there are interesting changes (in e.g. the
main
branch) to merge into your branch, use:
git pull upstream main