final corrections before submission
This commit is contained in:
+7
-4
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from core import Trainer
|
||||
|
||||
import random
|
||||
@@ -68,11 +69,7 @@ def Main(starter_choice,Nbattles):
|
||||
try:
|
||||
starter_name = starter_choice
|
||||
trainer = Trainer(name='edo', starter_name=starter_name)
|
||||
#print(f"{trainer.name} has chosen {trainer.starter} as their starter Pokemon!")
|
||||
#print("Adding potions and pokeballs to your inventory...")
|
||||
trainer.items = {"potions": 10, "pokeball": 10}
|
||||
#print("Your character is ready!")
|
||||
#print(f"Welcome {trainer.name}! Your adventure begins now!")
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
print("Something went wrong!")
|
||||
@@ -98,6 +95,8 @@ def Main(starter_choice,Nbattles):
|
||||
|
||||
def make_plots(Ngames,Nbattles):
|
||||
#SIMPLE PLOT
|
||||
if os.path.exists('plots') == False:
|
||||
os.makedirs('plots')
|
||||
cumulative_victories = np.zeros((Ngames,Nbattles))
|
||||
plt.figure(figsize=(10, 6))
|
||||
for starter_choice in gd.available_starters:
|
||||
@@ -171,6 +170,10 @@ def make_plots(Ngames,Nbattles):
|
||||
if __name__ == "__main__":
|
||||
Ngames = 500
|
||||
Nbattles = 100
|
||||
if os.path.exists('results') == False:
|
||||
os.makedirs('results')
|
||||
if os.path.exists('plots') == False:
|
||||
os.makedirs('plots')
|
||||
for starter_choice in gd.available_starters:
|
||||
for i in range(Ngames):
|
||||
print(f"Generating data for {starter_choice}, game {i}...")
|
||||
|
||||
Reference in New Issue
Block a user