A Simple Chess Game implemented in Java using JavaFX
This is a basic implementation of a Chess game using JavaFX. The game allows two players to play against each other on the same machine. The game includes basic features such as piece movement, capturing, and check/checkmate detection.
Basic piece movement and capturing Check and checkmate detection Promotion of pawns to queen, rook, bishop, or knight Simple game loop with animation
Run the game by executing the HelloApplication class. The game will start with a new board and pieces. Players take turns clicking on a piece to select it, and then clicking on a square to move it to. The game will detect checks and checkmates, and alert the players accordingly. The game will also handle promotions and castling.
The game is implemented using JavaFX for the GUI and game loop. The game logic is implemented in the GamePanel class. The game uses a simple animation timer to update the game state and render the board. The game pieces are implemented as separate classes, each with their own movement and capturing logic.
This is a basic implementation of a Chess game, and there are many features that could be added to make it more complete. Some ideas for future development include:
Implementing en passant and castling rules Adding a timer and scoring system Implementing a more advanced AI for computer opponents Creating a multiplayer mode using network sockets or a game server
If you're interested in contributing to this project, please fork the repository and submit a pull request with your changes. You can also open an issue to discuss potential features or bugs.
This project was inspired by the many online resources and tutorials on building a Chess game in Java. Special thanks to the JavaFX community for their support and resources.