I built a chess engine in java!
im new to programming, and this was my first serious project!
@Rishan001 sorry idk what you mean by without revealing anything in my answer, but basically how it works is it generates a list of legal moves. Then loops through that list, making and undoing each move. Before undoing however the function calls itself again recursively. This goes until a certain preset depth. Then with all those possibilities, it calculates each position's value (mostly in material) and decides what move is best assuming both players try to maximize their own material advantage.