Skip to content

Feature/online players list and leaderboard - #19

Merged
Hazem-0 merged 43 commits into
developfrom
feature/online-players
Jan 13, 2026
Merged

Feature/online players list and leaderboard#19
Hazem-0 merged 43 commits into
developfrom
feature/online-players

Conversation

@MahmoudRafaat

Copy link
Copy Markdown
Contributor

No description provided.

MahmoudRafaat and others added 21 commits January 10, 2026 16:50
Introduces new FXML files for the main home screen, players list, leaderboard, and recorded games views. These files define the UI structure and controllers for each section, enabling navigation and display of relevant content in the application.
Introduced LeaderboardController and RecordedGamesController JavaFX controllers with initial structure. Added a comprehensive home.css stylesheet to style the application's home page, including transparency fixes, tab and card styling, and modern scrollbar appearance.
Introduces PlayerEntity, GameRequestInfo, and AvailablePlayersInfo model classes to represent player and game request data. Also adds a 'home' screen to the Screens enum for navigation.
Introduced GameResponseInfo, GameStartInfo, and MoveInfo classes in the domain model to represent game response details, game start information, and move data for the Tic Tac Toe client.
Added new actions and error codes to the Action enum for improved server-client communication. Updated ServerConnectionManager to handle intentional disconnects and server connection loss with user alerts and navigation. Extended MessageRouter to support new actions, event handling, and error reporting, including integration with HomeController for UI updates.
Introduced GameService for handling game requests and responses. Added HomeController and PlayersController to manage UI interactions, player lists, and game challenge flows in the Tic-Tac-Toe client.
…e-manager

# Conflicts:
#	src/main/java/com/boredxgames/tictactoeclient/domain/network/ServerConnectionManager.java
#	src/main/java/com/boredxgames/tictactoeclient/domain/services/communication/Action.java
#	src/main/java/com/boredxgames/tictactoeclient/domain/services/communication/MessageRouter.java
Refactored home.fxml to use a StackPane root with a background pane and nested BorderPane for main content. Updated leaderboard.fxml with a modernized layout, including a styled leaderboard card, scrollable player list, and a footer for the current user's rank and score.
Introduces BackgroundHomeAnimation for animated 'X' and 'O' particles in the home screen background. Refactors HomeController to support the new background, updates FXML fields, improves error handling, and adds leaderboard UI update logic.
Refactored LeaderboardController to display a dynamic, styled leaderboard with rank icons, player avatars, and a footer for the current user's rank. Also updated PlayersController to label pending players as 'Pending' instead of 'BUSY' and added a debug print statement for challenge actions.
Introduces GET_LEADERBOARD action and requestLeaderboard method to support leaderboard retrieval. Refactors AuthResponseEntity to use consistent 'score' naming. Enhances MessageRouter with leaderboard UI updates and improved error handling for room and opponent issues.
Corrected the Action enum to properly separate constants with commas and fixed indentation.
Implemented the openSettings method in HomeController and connected it to the settings button in home.fxml. This allows navigation to the settings screen when the settings button is clicked.
Refactored updateLeaderboard to handle cases where the player's score is zero by displaying 'NA' as rank. Limited leaderboard display to top 5 players with positive scores and improved visibility logic for the current player's rank bar.
@MahmoudRafaat MahmoudRafaat changed the title Feature/online players Feature/online players list and leaderboard Jan 12, 2026
Hazem-0
Hazem-0 previously approved these changes Jan 12, 2026
ZeiadT
ZeiadT previously approved these changes Jan 12, 2026
Renamed the GameService class to OnlinGameSession and updated all references in HomeController and PlayersController to use the new class name. This improves clarity and consistency in naming related to online game session management.
@MahmoudRafaat
MahmoudRafaat dismissed stale reviews from ZeiadT and Hazem-0 via 390596d January 13, 2026 08:43
…ture/online-game-manager

# Conflicts:
#	pom.xml
#	src/main/java/com/boredxgames/tictactoeclient/App.java
#	src/main/java/com/boredxgames/tictactoeclient/domain/network/ServerConnectionManager.java
#	src/main/java/com/boredxgames/tictactoeclient/domain/services/communication/Action.java
#	src/main/java/com/boredxgames/tictactoeclient/domain/services/communication/MessageRouter.java
#	src/main/java/com/boredxgames/tictactoeclient/presentation/Server_connectionController.java
#	src/main/java/module-info.java
ZeiadT and others added 2 commits January 13, 2026 10:58
…ture/online-game-manager

# Conflicts:
#	src/main/java/com/boredxgames/tictactoeclient/domain/services/GameService.java
#	src/main/java/com/boredxgames/tictactoeclient/presentation/HomeController.java
#	src/main/java/com/boredxgames/tictactoeclient/presentation/PlayersController.java
#	src/main/java/module-info.java
Hazem-0
Hazem-0 previously approved these changes Jan 13, 2026
ZeiadT and others added 4 commits January 13, 2026 13:48
…ture/online-game-manager

# Conflicts:
#	src/main/java/com/boredxgames/tictactoeclient/domain/managers/navigation/Screens.java
#	src/main/java/com/boredxgames/tictactoeclient/presentation/GameModeScreenController.java
MahmoudRafaat and others added 13 commits January 13, 2026 15:06
Deleted the Player.java file from the domain model. This may indicate a refactor or removal of unused code related to player representation.
Refactored move handling logic for both online and offline modes to ensure moves are validated and applied consistently. Added game state checks after each move to handle game end scenarios immediately. Updated turn indicator and board enabling/disabling logic for better user experience.
…yers

# Conflicts:
#	src/main/java/com/boredxgames/tictactoeclient/domain/managers/navigation/NavigationManager.java
#	src/main/java/com/boredxgames/tictactoeclient/presentation/GameModeScreenController.java
…ture/online-players

# Conflicts:
#	src/main/java/com/boredxgames/tictactoeclient/presentation/GameController.java
@Hazem-0
Hazem-0 merged commit c6929d2 into develop Jan 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants