Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+13 votes
asked in CSC305 Fall 2022 by (8 points)

1 Answer

+6 votes

My group did the hexagon tiles. I studied the geometry.
https://www.splashlearn.com/math-vocabulary/geometry/hexagon
We can calculate the vertexes using simple trigonometry. And then draw it by strokePolygon method on the canvas.
The strategy that my group used was we created the top left hexagon and then translated it according to the its row and column.
For selection there is a Polygon object class in java which has a contains method. So we can use that.

answered by (8 points)
...