top of page

The Epidemic Environment Simulation is a simulation that shows the spread of a disease with no vaccine on humans over many days on a visual grid. All humans start as uninfected except for 1 human from each age class (Child/Adult/Elder). Humans may move each day and the infection will spread based on age/distance from the infected/if the virus was previously had.

Epidemic
Environment
Simulation

Date: September 2022

Role: Sole Programmer

Technologies Used: Visual Studio | C++

Code Samples

Constructed the grid with a 2D Vector

The entire program revolves around a 2D Vector made up of "Human" objects which are constructed at the start of the program. Humans with specific stats chosen by the user are then loaded into the vector. After that, the vector can be manipulated by a "movePeople" function that allows humans with specific stats to move to a different spot on the grid.

Implementing Spread of Infection

There are multiple functions involved in deciding the spread of infection and stage of infection. First, it is checked if an uninfected human is near an infected human. If that is true then another function triggers deciding if they get infected. Lastly, there is a function to decide the progress of the infection within infected humans.

Displaying Daily Stats

Finally, at the end of each day, there is a function that displays the current grid using ASCII symbols "|" and "_". The letters C, A, and E represent children, adults, and elders respectively. The letter "I" is placed next to infected humans. There is also a chart at the top is shown displaying the stats. For more visual appeal, I added colored text and occasionally highlighted text

© 2025 by Carter Meyer

bottom of page