I have just published on github tiles.
When I was repairing home, I looked into different solutions for bathtub/floor tiles, choosing different colors. This led to a journey into graph coloring, looking for the best algorithm, and the above Maven project.
As of today, I have two tests:
- Random colors: the color of each tile is randomly chosen
- Welsh-Powell colored tiles: no adjacent tiles share the same color. Since this is a greedy algorithm, we end up with an unevenly distribution of tiles
Eventually, I will implement an in-between solution: no touching colors, but a better distribution.