This is a repository I forked off of teemoo7's implementation of chess primarily to practice using the MVC design pattern and MySQL databases. This repository is for my personal learning and future reference.
In the Windows Command Prompt, type the following command:
mysql -u root -p
When prompted, type in whatever you set the password to. A welcome messages should be displayed once you enter the monitor.
If you get an error message after you type in the password, check that you typed in your password correctly and that the MySQL database is running in Windows Services.
The remainder of this README is from teemoo7's original README file.
This basic Chess game is a humble tribute to famous Chess player Robert James "Bobby" Fischer, World Chess Champion.
Note that the author does not agree with Fischer's political and religious opinions, but remains a fan of his genius at Chess.
Note: requires Java 17
If you are interested in how this engine works, please have a look at those two articles by the author:
- Implementing a Chess engine from scratch
- Enhancing a Java Swing App to a clean, elegant Web App without changing the code
- If not already done, you can install OpenJDK 17 for free (see the excellent distributions of Temurin by Adoptium)
- Download the latest release JAR
- Then launch the downloaded JAR
java -jar bobby-0.1.jar
- Checkout the code
- Build it with maven
mvn package -Dmaven.test.skip=true
- Launch the created JAR
java -jar target/bobby-1.0-SNAPSHOT.jar
Open https://www.bobby-chess.com/bobby/ for a browser version of the game (limited to one single user at a time).
- AI with multiple strength level, from random-stupid to 3-depths computation, using a minimax algorithm
- All moves implemented
- Change GUI view according to selected color
- Draw proposals
- Undo last move
- Suggest move
- Usage of 15+ famous openings
- Limit computation time to n seconds
- Save game to and load from text files with basic notation
- Load PGN file
- AI is as arrogant as the real Bobby was 😄
- Uses Java 17
- Ability to use bundled light JRE (doc here)
- Strong code coverage, incl. GUI testing
- Code style with Checkstyle, code quality with SpotBugs and SonarSource
- Pipeline with GitHub Actions
- Uses a nice modern Look & Feel FlatLaf for all platforms
- Uses free font FreeSerif in order to have a nice rendering of chess pieces
The implemented AI works uses a depth-first computation, which means that if the computation time is restricted, it may not evaluate every single possible move: it evaluates as deep as possible a first move, then a second, etc, but has no guarantee to cover every move of the first depth.