There is a disease outbreak! Will you find patient zero?!?
### ~
**Infection** is a distributed game which simulates
the propagation of an illness. **The goal is to stop the outbreak before every player dies!**
In this game, a master @boardname@ infects a "patient zero" player
with the sickness. The infected player will be contagious immediately but won't show any sign
during the incubation time. The sickness gets transmitted when two @boardname@ get close to each other.
After the incubation period, the sad face will appear on the screen. After the sickness period, the player will eventually die and a skull will display on the screen. Dead players are out of the game.
Once the game is over, pressing **B** will display which player got infected. This can be used to trace back the infection up to patient zero.
If any player survives the outbreak, the game is won. Otherwise try again!
### How to play
Press A+B to enter master mode (1 per game).
Wait for players to be paired. The number of paired player will display on screen.
An icon will appear on player's screen.
Press A+B to start the infection game. The master will pick a random player as patient zero.
A player will transmit the disease if close enough (RSSI) and with a certain probability (TRANSMISSIONPROB).
During the incudation phase (INCUBATION), the player does not show any sign of illness (happy face).
After that phase, the sad face shows up.
Player control:
* ``A`` button: show identity icon
* ``B`` button: show current infection status
```typescript
/**
* Infection game
*
* Flash all micro:bit will this script
*
* Press A+B to enter master mode (1 per game)
*
* Wait for players to be paired. The number of paired player will display on screen.
* An icon will appear on player's screen.
*
* Press A+B to start the infection game. The master will pick a random
* player as patient zero.
*
* A player will transmit the disease if close enough (RSSI)
* and with a certain probability (TRANSMISSIONPROB).
* During the incudation phase (INCUBATION), the player does not show any sign
* of illness. After that phase, the sad face shows up.
*
* Player control:
* A button: show identity icon
* B button: show current infection status
* Master control:
* A button: show patient zero identity + number of players
* Sad face = infected
* Happy face = not infected
*/
const INCUBATION = 20000; // time before showing symptoms
const DEATH = 40000; // time before dying off the disease