This C++ program built in Sublime and run through the command line is passed a file with the names, distances, and infection state of cities in an adjacency matrix. Cities that have roads still connecting them (not cut off by zombies) have a positive distance, and cut off cities have a distance of -1. Cities that are safe are labeled with an S, and cities that are infected are labeled with an I. After running the program, a graph composed of a linked list of vertex city names pointing to arrays of adjacent cities is built from the file. After all the cities have been added to the graph, a main menu will be displayed with a list of options. Typing a 1 and then pressing enter will print the vertices. 2 will set the districts based on the cities that are connected to each other. 3 will find the shortest unweighted path between cities. 4 will find the shortest distance between two cities. 5 will simulate a zombie infection starting at infected cities, and outputting the number of time cycles taken to play out. Lastly, 6 will quit the program.
-
Notifications
You must be signed in to change notification settings - Fork 0
This C++ program built in Sublime and run through the command line is passed a file with the names, distances, and infection state of cities in an adjacency matrix. Cities that have roads still connecting them (not cut off by zombies) have a positive distance, and cut off cities have a distance of -1. Cities that are safe are labeled with an S, …
Connorado9/Zombie-Invasion-Simulation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This C++ program built in Sublime and run through the command line is passed a file with the names, distances, and infection state of cities in an adjacency matrix. Cities that have roads still connecting them (not cut off by zombies) have a positive distance, and cut off cities have a distance of -1. Cities that are safe are labeled with an S, …
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published