final corrections before submission
This commit is contained in:
+4
-4
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
import random
|
||||
|
||||
#load moves from json file
|
||||
#eclude moves with power equal to null,
|
||||
# do not consider the effect,effects or changes fields
|
||||
|
||||
#exclude moves with power equal to null,
|
||||
#do not consider the effect,effects or changes fields
|
||||
available_moves = dict()
|
||||
keys_to_skip = ['effect','effects','changes']
|
||||
with open('moves.json', 'r') as file:
|
||||
@@ -33,7 +33,7 @@ with open('pokemons.json', 'r') as file:
|
||||
for m in available_moves.keys():
|
||||
if available_moves[m]['type'] in current_pokemon_types:
|
||||
compatible_moves.append(m)
|
||||
#select two random moves
|
||||
#select two (compatible) random moves
|
||||
selected_moves = [random.choice(compatible_moves) for _ in range(2)]
|
||||
pokemons_dict[p['name']]['moves'] = selected_moves
|
||||
|
||||
|
||||
Reference in New Issue
Block a user