-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add indicators for illegal card play #121
Comments
Hey ! Can i take a look at this ? |
@norswap there has been an inactivity for a while now on this issue, can I jump on this? |
Hi @norswap is this still available? |
Yep, it's still open. |
Hey @norswap can I take this?? |
Hey Asher, 0xFable development is on ice for now. You can take it but aware that there might a long delay for the review to come in. If that's fine, go ahead! |
That's fine |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI've done some academic projects in JS and TS and I've done a tutorial of Solidity so I want to try to solve this problem to improve my skills in this languages, I'm almost sure I can figure it out. How I plan on tackling this issueI would do the following: |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedAs a seasoned JavaScript developer with experience in front-end development and UI/UX design, I have honed my skills in creating intuitive and responsive interfaces. My background includes working with modern JavaScript frameworks like React, which is often used in game development for managing state and rendering dynamic components. This experience will allow me to address the problem efficiently by ensuring the interface behaves as expected and provides users with clear visual feedback. How I plan on tackling this issueApproach to the Problem: First, I'll locate the existing logic that determines when a player can legally play a card. This condition likely exists in the function or component responsible for handling the playCard transaction. I will extend the existing condition to control the visibility of the green drop background. This ensures that the background only appears when it's the player’s turn and they haven't already played a card. I'll modify the component rendering the drop zone to conditionally apply the green background style. This will involve checking the extended condition and applying the appropriate CSS class or style dynamically. Thoroughly test the solution to ensure the green drop background only appears in legal scenarios: Review the code to ensure that the new logic is efficient and does not introduce unnecessary complexity. Refactor any related code if necessary to maintain code quality and readability. Document the changes made to the codebase, explaining the new logic and how it interacts with the existing system. This will help other developers understand the solution and maintain it in the future. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI would like to contribute to this issue |
@SIDHARTH20K4 @OSEH-svg @mamicho16 One of you can work of this issue, but please decide between yourself who it would be. The budget for this issue is 150OP. Also note that the project is currently paused, and so the delay to get a review might be lengthy (= few weeks, should be less than a month in any case). Please acknowledge this here if you still want to tackle the issue. |
Hello @norswap. It would not be a problem. I am still interested in being assigned the task |
@norswap |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am a 24 year old software engineer and a web3 enthusiast with web development experience, has been involved in various blockchain projects. I have worked with Javascript - to specifically write deployment scripts for smart contracts written in solidity and familiarity with typescript because of Angular. I believe I can resolve this issue. How I plan on tackling this issueI have already looked at the git repo.
|
Guys, please decide between yourself on one person to tackle this. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI’ve worked on creating and modifying UIs in response to game conditions based on my experience with game logic. In this case, the issue is that the green drop background appears even when it’s not the player’s turn or they’ve already played a card. The game already blocks illegal moves, so the condition for valid plays exists. What needs to be done is to link this logic to the UI, ensuring the green background only shows when a card can legally be played, providing a clearer user experience. How I plan on tackling this issueI’d approach this by first identifying the existing logic that governs legal card plays, since it already blocks invalid moves. Then, I’d link that logic to the UI to ensure the green background only shows when playing a card is allowed. Finally, I’d test and debug the UI to make sure the feedback is consistent and accurate across all scenarios. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI would like to apply for the task of adding indicators for illegal card play. My background is in Unity game development. I have knowledge in game design and gameplay system implementation. I have suitable knowledge with JavaScript syntax but I'm majored in C# and Python. How I plan on tackling this issueFind variables storing player turn. If there's none, we create one. Use this information the define a boolean state judging player turn. or state machine. This would constrain playing actions to the currently active player. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm a CS major with a lot of experience developing front ends for web3 applications using JavaScript, TypeScript, and Solidity. My background includes building user interfaces that communicate with smart contracts, handling game state management, and creating responsive UI elements. This experience will help this project's card play indicators be improved. How I plan on tackling this issueI would first examine the present coding to comprehend how the turn system and card play mechanics are built before adding indicators for illegal card plays. I would pinpoint the reasoning for legitimate card plays and expand it to regulate the green drop background's appearance. To do this, it would probably be necessary to change the card rendering component such that, before applying the green background style, it checks the game status (current player's turn, cards played this round). In the event that the game's state changes, I would make sure this check is responsive and performant. To confirm proper indication behaviour, testing would include a range of game circumstances. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedMy background includes hands-on experience in blockchain development, specifically with the Starknet ecosystem, which aligns with the fully on-chain nature of 0xFable. I have contributed to projects that involve smart contracts and zero-knowledge circuits, particularly around Python SDKs, making me familiar with the structure of on-chain gaming logic and interaction. Additionally, my experience in frontend design and game mechanics would allow me to effectively contribute to improving user experience, like in this case of better managing game interactions. How I plan on tackling this issueReview Existing Codebase: I would first dive into the codebase to identify where the card-dropping interaction is being handled. Since you mentioned that the logic for when a card can’t be played is already in place (as the playCard transaction isn't triggered when it's not allowed), I would locate that condition to reuse or extend it for the display logic. Separate Drop and Action Logic: Once the condition is found, I would refactor it so that the legality of dropping a card is checked separately from the actual card-playing transaction. This will allow controlling both the game logic and UI feedback independently but cohesively. Adjust UI Behavior: In the front-end/UI, I would ensure the green drop background appears only when: It’s the player’s turn. Testing and Validation: After implementing the changes, I would test it with various scenarios, such as trying to drop a card out of turn or after a card has already been played. I’d check that no green drop background appears in these cases, and that a card can only be played when the conditions are met. |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedHello, Can i work on this task? |
Hello can i work on this task |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI have been working with my solidity for my past 6months and I can make good contribution on this project. |
Currently the game allows playing a single card every turn.
Two things are thus illegal:
But the interface currently shows the green drop background in all of these scenarios. This should be changed so that this drop background only appears in situation where playing a card is legal. The condition is probably already in the code somewhere, since we do not trigger a
playCard
transaction when it is not possible, which just need to extend the condition to the display of the green background.The text was updated successfully, but these errors were encountered: