Unique board/player ID
We could implement some kind of UID in hardware to uniquely identify each board/player. But do we need this? Probably could do it in Software, which is more flexible, but not as clean.
We need at least 10 different ids. This could be achieved in different ways:
Hardware
All of the following solutions could be implemented with variable ids using jumpers.
Simple binary solder id
By simply connecting a GPIO to either ground or VDD during soldering we get 1 bit. We would need 4 GPIOs to reach 16 > 10.
Simple ternary solder id (requires pull up and down GPIO)
By simply connecting a GPIO to either ground or VDD or floating during soldering we get three states (we can check for floating using pull up/down). We would need 3 GPIOs to reach 27 > 10. More complicated and requires pull up and down.
2 ternary inputs and 1 in/output
Two GPIOs can each either be connected to GND or VDD or to a third GPIO configured as output. This gives us 3*3 ids, to get a 10th option, the output GPIO could alternatively be connected to GND. Then we first have to check that (using pull-up). If it is not shorted, we can check the other two pins.
Special UID IC
There are dedicated I2C or 1-Wire ID ICs, but that is most likely overkill. They also usually return a longer ID, so we would still need to map it to our 1-10.
Software
MAC -> ID table
Each ESP should have a unique MAC address. We could hardcode a map of MAC -> ID into the program.
Not visible from the outside.
Store ID in EEPROM
We could write the id into EEPROM once. But we need to do this once per device and it might be overriden later.