Due to the coronavirus/COVID-19 I had some time at home and I made use of it. So I’m proudly presenting my virus simulation app. The app starts with 20 persons, represented as dots, on your screen. At first, only one person is infected. But as the virus spreads, more people get infected. The app uses color coding for easy recognition. Green means healthy, red means infected, yellow means revered and black means dead. You can tune parameters such as infection distance and infection rate on a separate screen and watch how the growth of the virus changes.
Note: The results of the app are not comparable as the parameters are unitless and the model is very rough. The infection state could be modeled in more detail. The movements are random at the moment and I hope that the error will be normally distributed in that way. Also, the size of everything on the canvas depends on your screen size and resolution.
Hi, Red Panda. That is a nice app you made!
Because I was just finishing a very similar app, I took a closer look. My app is more modest and simpler, it just tries to explain that social distancing helps a lot to beat the virus. I do not want to hijack this tread, therefore I will attach mine to another thread.
I just would like to remark a few things on the code.
Your Settings screen is good, nice lay-out!
I did not like so much the partial disabling of blocks, this was hardly necessary considering the amount of blocks.
Your color abstraction is good (I changed my app accordingly)
I think you should change your “components” procedure, because the list would be built every time you need it. Since a few releases ago you can also define your list like this:
I am not really sure you need the notAlreadyHandled switch in the when any… blocks, because you do not have any spefic ball events. But then… I cannot find the documentation about it.
My 2 cents.
Nice work! Cheers, Ghica.
Hi, thanks for your remarks on my code. Let me adress them one by one
The disabling was necessary to indicate that the Spinner.AfterSelecting block is not working for me. The spinner component has changed a lot since I used it last time, now it is more like a radio button instead of a dropdown.
Is that the case? Because I normally do constants like this