Print the state of a sand `pile` after droping `n` sand grain on top of it.
* Sand pile is a square table of uneven size (viewed from up)
* Sand grain is always dropped on center of pile
* When a cell had 4 grains inside, these grains moves on the near 4th cells
* Grains going out the pile are losts
Propation is right for small iteration and/or pile with low grain rate.
For pile with high grain rate, the main while loop is not enough to make propagation
in all cells
Structure for pile walking to find cells greater than 3 is set
I do not update neighbors cells, then only central value of the pile (where the
sand grain is dropped) is at the right value in the end
1st idea was to manage propagation cells after cells. But this looks to generate
a chain reaction that I cannot manage in a function.
New idea is to manage the whole pile :
* add a grain
* find cells that reached 4
* change cell & update neighbors
* find cells that reached 4
* change cell & update neighbors
I am pausing the devel here, I have to prioritise another project.
Doctests seems to be obsolete for testing network scripts.
I'll be back with Pytest!
Adds `server_log()` method in order to export the `print()` calls.
Centralize _log_, _broadcast_ & _send_ operations in the bottom of the
loop (except when sockets needs to be close).
I think it is improves readability and will facilitate code evolution,
for example when writing the servers log in file(s).
Now sends messages only to named-client, and for that uses
`list_sockets()`
Takes sender name from `_user_name` attribute and delete the name
argument from the method
`list_sockets()` uses only clients with a name already typed in
(filled in `_user_name` attribute), to avoid starting a game with not
named player
`count_clients()` was too messy and autonomous, now it uses
`list_sockets()` for counting only named players and not depend on
naming player mechanism or main socket.# Veuillez saisir le message de
validation pour vos modifications. Les lignes