This repository was archived by the owner on May 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: implement local player #7
Merged
Merged
Conversation
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
- Add a new thread for state updates - Move state update logic to the new thread - Detach the thread to allow asynchronous execution
- Add LocalPlayer class for human player - Implement render method in Player class - Update State class to include local player - Adjust player rendering in State class
- Update Player and LocalPlayer classes to take an additional parameter `is_current_player` in the render method - Modify the render logic in LocalPlayer to only dim cards if it's not the current player's turn - Update the State class to pass the correct `is_current_player` flag when rendering each player
- Use uppercase for other constant variables
…ttings - Add CARD_SCALE constant to card.cpp for consistent scaling - Remove redundant sprite scaling in deck.hpp, discard_pile.hpp, and player.hpp
- Implement Button class with hover and click detection - Add rendering functionality with visual feedback on hover
- Update LocalPlayer class to handle card selection and color picking - Add button rendering and click detection for color picker - Modify State class to pass render target to LocalPlayer - Refactor main loop to continuously update game state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (7)
- src/button.hpp: Language not supported
- src/card.cpp: Language not supported
- src/deck.hpp: Language not supported
- src/discard_pile.hpp: Language not supported
- src/main.cpp: Language not supported
- src/player.hpp: Language not supported
- src/state.hpp: Language not supported
2053ef2
to
c4586f4
Compare
c4586f4
to
151a845
Compare
PaperPlaneLSY
approved these changes
Mar 29, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.