Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pieces are hard to find once the map gets busy. With this commit, when a player hovers over the pieces on the stock dashboard (left sidebar) all the pieces of that type are highlighted on the board by a white background. board.js * New method (highlightTiles) was added to draw white background octagons behind pieces. The existing drawTiles method is called with an additional localPiece argument. This second method loops through the gameBoard array and draws a white octagon whenever the localPiece type is found. * New method clearHighlightTiles clears the new board layer (and thus the highlighting) once the player mouses off the left sidebar. dashboard.js * New method hoverPieceOn checks which icon is being hovered over on the left sidebar (using mouseover combined with id of target) and calls highlightTiles with the piece type. main.js, movement.js, pirates.js * New board layer is added in main.js * New event listeners are added and removed within game logic. board.css * Adds CSS info for the new board layer.
- Loading branch information
1 parent
962d4a5
commit 7ef6da9
Showing
6 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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