Honeycombs: Difference between revisions

We might as well continue to until all of the hexagons have been selected
(→‎{{header|Tcl}}: Added PureBasic)
(We might as well continue to until all of the hexagons have been selected)
Line 3:
The task is to produce a matrix of 20 hexagon 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. TheA selectedrecord hexagonof shouldthe nowchoses changeletter colourshould onbe themaintained display.and Athe messagecode should be nowsuitably becommented, outputat sayingthe "Thepoint userwhere chosethe the selected letter E"has (orbeen whateverdetermined. letterThe theselected userhexagon actuallyshould chose)now change colour on the display. The cycle repeats until the user has chosen fiveall of the letters. Note that each letter can only be selected once and previously selected hexagons retain their colour after selection. The program terminates when all five letters have been chosen.
 
[[image:honeycomb.gif]]