Gui with controllers, added matts integration, fixed tests#1
Merged
Conversation
…nt4MonopolyProject into Gui_with_controllers
There was a problem hiding this comment.
Pull Request Overview
This PR integrates GUI components into game controllers and updates various modules to improve user interaction and game flow while removing some outdated test files. Key changes include:
- Integration of a new GUI in Main and updated controller logic for turn management, human/CPU players, and auctions.
- Refactoring of methods in Property, Banker, and Auction controllers to simplify logic and improve messaging.
- Removal of legacy test files for BoardController and BankerController.
Reviewed Changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Controller/BoardControllerTest.java | Entire removal of tests, likely due to updated testing strategy. |
| tests/Controller/BankerControllerTest.java | Entire removal of tests, likely due to updated testing strategy. |
| src/Model/Spaces/ChanceSpace.java | Added import for PlayerNotFoundException. |
| src/Model/Property/Property.java | Updated team member attribution and simplified offerPurchase logic. |
| src/Model/Main.java | Added system look-and-feel setup and integrated BoardController GUI. |
| src/Model/Game.java | Removed duplicate board initialization. |
| src/Model/Cards/CommunityChestCard.java | Deposited $200 on Advance to Go card usage. |
| src/Model/Cards/ChanceCard.java | Updated movement handling and added descriptive logging. |
| src/Model/Board/Player.java | Added tokenName with corresponding getter/setter for GUI use. |
| src/Model/Board/HumanPlayer.java | Modified move log message. |
| src/Model/Board/Banker.java | Improved player property management and auction processing. |
| src/Controller/TurnManagerController.java | Integrated GUI updates and refined dice roll logic. |
| src/Controller/HumanPlayerController.java | Enhanced dialogs for property purchase and jail release. |
| src/Controller/CpuController.java | Added decision logic for CPU property bidding. |
| src/Controller/BankerController.java | Added GUI updates and robust error handling in transactions. |
| src/Controller/AuctionController.java | Extended auction UI with automated CPU bids and timer controls. |
Files not reviewed (2)
- pom.xml: Language not supported
- runJar.sh: Language not supported
Comments suppressed due to low confidence (2)
tests/Controller/BoardControllerTest.java:1
- The BoardControllerTest file has been completely removed. Confirm that this removal is intentional and test coverage for BoardController functionality is maintained elsewhere.
Entire file content removed
tests/Controller/BankerControllerTest.java:1
- The BankerControllerTest file has been completely removed. Ensure that this removal is deliberate and that critical tests for BankerController behavior exist in another location.
Entire file content removed
| } | ||
| createAuctionDialog(parentFrame); | ||
| auctionDialog.setVisible(true); | ||
| while (auctionInProgress) { |
There was a problem hiding this comment.
Using a busy-wait loop with Thread.sleep after showing the auction dialog can block the UI thread. Consider using modal dialog behavior or event-driven callbacks to handle auction completion more efficiently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.