averbraeck / housinggame-player

Player app for the housing game
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Greyed-out choices in measure table for already bought measures #47

Closed averbraeck closed 7 months ago

averbraeck commented 10 months ago
averbraeck commented 7 months ago

Checkboxes cannot be made readonly. A trick is described in https://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly :

<input type="hidden" name="my_name" value="1" /> 
<input type="checkbox" name="my_name_visual_dummy" value="1" checked="checked" disabled="disabled" />
averbraeck commented 7 months ago

After this change, the greyed out options work correctly:

image

and after buying a new option:

image

averbraeck commented 7 months ago

The fact it is given cannot easily be distinguished from the fact is was really bought in a round, since the given measures "simulate" that they were bought in a round.

averbraeck commented 7 months ago

There is not really room on the screen to display in which round a measure was bought. And it is not easy to retrieve either. The database was not built to easily retrieve historical information, since only the current state is available in the current round. So, the round number in which a measure was bought is NOT implemented for now.

averbraeck commented 7 months ago

The most important change, greyed out measures, has been implemented.