Closed TKanX closed 3 weeks ago
This is a good start, but I think there should be some way the player can see what pieces the other player has, not just the number of pieces. An idea is that if they click on the number, a pop up will occur that shows the colors of the pieces the player has and how many pieces each.
Ok, I've reopened this issue and will implement this feature.
Implemented a new feature that creates a container that shows the pieces and their counts when the player element is hovered over or touched.
Closes #30
showPlayerPiecesOnHover
in GameUI to display the count of pieces below the player's avatar on hover.pieceCountMap
in GameUI to correctly assign the index from the pieces
array instead of the pieceCountMap
.reduce
function to include the index i
and store it in the pieceCountMap
.forEach
loop to use the correct index from pieceCountMap
.
Summary:
Implemented a new feature that displays the count of pieces a player has directly below their avatar in the game UI. This change enhances the user experience by providing quick, accessible information during gameplay.
Related Issues:
Closes #30
Changes:
Screenshots: