Honeycombs: Difference between revisions

From Rosetta Code
Content added Content deleted
(5 columns of 4 is different than 4 rows of 5)
(clarification of arrangement pattern)
Line 2: Line 2:


The task is to produce a matrix of 20 hexigon shaped widgets in a honeycomb arrangement. The matrix should be arranged in such a manner that there are five
The task is to produce a matrix of 20 hexigon shaped widgets in a honeycomb arrangement. The matrix should be arranged in such a manner that there are five
columns of four honeycombs. Each hexagon should be the same colour, and should
columns of four hexagons. The hexagons in columns one, three and five are aligned horizontally, whereas the hexagons in columns two and four occupy a lower position within the arrangement. Each hexagon should be the same colour, and should
display a unique randomly selected single capital letter on the front. The application should now wait for the user to select a hexagon, either by using a pointing device, or by pressing a key that carries a corresponding letter on a hexagon. The selected hexagon should now change colour on the display.
display a unique randomly selected single capital letter on the front. The application should now wait for the user to select a hexagon, either by using a pointing device, or by pressing a key that carries a corresponding letter on a hexagon. The selected hexagon should now change colour on the display.



Revision as of 20:25, 25 May 2011

Honeycombs is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The task is to produce a matrix of 20 hexigon shaped widgets in a honeycomb arrangement. The matrix should be arranged in such a manner that there are five columns of four hexagons. The hexagons in columns one, three and five are aligned horizontally, whereas the hexagons in columns two and four occupy a lower position within the arrangement. Each hexagon should be the same colour, and should display a unique randomly selected single capital letter on the front. The application should now wait for the user to select a hexagon, either by using a pointing device, or by pressing a key that carries a corresponding letter on a hexagon. The selected hexagon should now change colour on the display.