-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
45 lines (33 loc) · 1.01 KB
/
main.py
File metadata and controls
45 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from ecosystem.menu import (
menu, create_new_ecosystem, print_ecosystem_info,
add_new_species, search_species, update_species, remove_species, show_all_species,
update_resources, simulate_generations_wrapper
)
from ecosystem.classes import Ecosystem, AVAILABLE_SPECIES
print("\nWelcome to Ecosystem: \n")
eco = Ecosystem(10**3, 0.2)
for genus in AVAILABLE_SPECIES:
eco.add_species(genus)
while True:
choice = menu()
if choice == 1:
eco = create_new_ecosystem()
elif choice == 2:
print_ecosystem_info(eco)
elif choice == 3:
add_new_species(eco)
elif choice == 4:
search_species(eco)
elif choice == 5:
update_species(eco)
elif choice == 6:
remove_species(eco)
elif choice == 7:
show_all_species(eco)
elif choice == 8:
update_resources(eco)
elif choice == 9:
simulate_generations_wrapper(eco)
elif choice == 10:
print("Exiting...")
break