paulvangentcom / python_corona_simulation

An agent-based simulation of corona and other viruses in python
GNU General Public License v3.0
292 stars 76 forks source link

Lab02 #31

Closed ricky971128 closed 3 years ago

ricky971128 commented 3 years ago

Hello

I am a student studying software design. The teacher assigned us the homework of aggregation mode, so I will extract two pull requests to explain where aggregation mode can be used. Please understand. thank you

The first place you can reference aggregation is the demo Covid.py, in the update function of this file, lines 26 to 233 are used to draw and draw lines, but they have little significance in this actual project. Therefore, these 217 lines of code are redundant. Therefore, I extracted these 217 lines of code into three lines of code, realized encapsulation and eliminated redundancy., The second is build in visualiser.py Fig and draw_ TStep these two functions can be aggregated.

To sum up, I hope you can consider my point of view, thank you!