Concept:
For this week’s assignment, I created an interactive honeycomb, where the mouse acts as a bee and the honeycomb swaps its color on hover.
Sketch:
Code Snippet & Challenges:
// Check if mouse is over the hexagon if (isMouseOverHexagon(x, y, w)) { // Swap the color (state) board[i][j] = 1 - board[i][j]; }
This is the part of code that was the most challenging where I had to check if the mouse is over the hexagon and change the color of it.
Future Improvements:
I would add a bee in the place of the mouse to make it look nicer visually and more realistic.