Inspiration
I have always wanted to code something i can enjoy myself or others can enjory.
What it does
This project is a Java and JavaFX checkers application that allows users to play checkers through a graphical user interface. The application supports player usernames, games against a computer opponent, and games against another player.
How we built it
I began by creating the basic JavaFX interface and designing the different screens required by the game. After the GUI was working, I implemented the checkers board and the representation of the pieces.
The next stage focused on movement rules. I implemented normal movement, jumps, captures, and king promotion. After the basic game rules were working, I added additional logic for multiple jumps and determining when a player could no longer make a legal move.
I then worked on communication between players and added functionality for usernames, opponents, messaging, waiting for players, and playing against the computer.
The final stage focused on improving the user experience, handling game-ending conditions, and fixing invalid moves and turn-management problems
Challenges we ran into
One of the main challenges was making sure that players could not make illegal moves. The program uses methods such as invalid(), rest(), multiple(), and lock() to determine whether a move is permitted.
Another challenge was implementing forced jumps. If a capture is available, the player must perform a jump instead of making a normal move. The program also checks whether another capture is available after a jump.
King movement required additional logic because kings can move in both directions. I also had to handle the difference between regular pieces and kings when checking possible moves.
Another challenge was keeping the graphical interface synchronized with the underlying board state. After a move is received or made, the board needs to be redrawn so that the pieces displayed on screen match the internal game state.
What we learned
This project gave me experience combining multiple parts of software development into one application. I practiced Java object-oriented programming, JavaFX GUI development, event handling, arrays, collections, networking, and debugging.
I also learned that implementing a game requires careful attention to edge cases. A movement system must account for board boundaries, invalid destinations, captures, multiple jumps, kings, turns, and game-ending conditions.
Working on the GUI also showed me how the user interface and underlying program logic need to communicate with each other. A change to the board state needs to be reflected visually, while user actions need to trigger the appropriate game logic.
Log in or sign up for Devpost to join the conversation.