Currently the program has implemented the game logic of chess as ground work before it is possible to implement the bot to play aggainst.
The program will ask for player input in the command line. It will ask what to move and where. the game squares are named and a name could be for example e3 which means that the piece that is inrow 3 and column named e.
To give input you must use this format: e3 d4. Which tells that I want to move the piece that is in square named e3 to d3.
After giving the input the program will first check if you have selected the right colored piece for the turn (meaning white or black) and if there is a piece in the given spot. After verifying the piece that you want to move he program calculates all the possible moves for the piece and checks if your input move maches with the possible ones. Assuming you picked a valid move the gameboard will update and it is the opponents time to move.
After a valid move the program will check if the oponents king is checked in this new location by calculating the possible moves for a second time and if a second move is able to capture the king then there is a cheking situation The opponent that is checked can not make an illegal move if the king is checked. Possible moves are only to move the king to a safe place or capture the checking piece.
I came up with this idea to test my coding skills and try to make a MinMax algo for chess by utilizing as least as possble 3rd party resourses like AI or Stack Overflow. I got into a habit of using mostly only AI to help me code, which made coding stale and boring for me. I hope this project will revive my passion for coding and problem solving. Currently on the date of typing this (4.1.2025) I have used these resourses a hand full of times. AI for minor bug fixes and syntax checking in the begining of the project. Some move calculating methods for individual chess pieces
The goal of this project is not to create the world's fastest chess engine, but to develop a functional one, enjoy the process of implementation, and explore exciting new concepts. Additionally, this project will contribute to my bachelor’s thesis at Tampere University.
This project was made in Intellij IDEA as a maven project. After making a maven project, it is ready for running.
I use the junit library for testin
pom.xml
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>