Skip to content

Commit

Permalink
v0.6-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ercdndrs authored Jan 19, 2021
1 parent 8689e92 commit 79be95a
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions scripts/import_testing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import pickle
import sys

# We need to import some class definitions from the parent directory.
from os.path import dirname, abspath, join
base_dir = dirname(dirname(abspath(__file__)))
sys.path.insert(1, base_dir)
sys.path.insert(1, base_dir+'\\automaxlair')
from automaxlair import Pokemon, Move, matchup_scoring


def main():
boss_pokemon = pickle.load(open(base_dir+'/data/boss_pokemon.pickle', 'rb'))
rental_pokemon = pickle.load(open(base_dir+'/data/rental_pokemon.pickle', 'rb'))
boss_matchups = pickle.load(open(base_dir+'/data/boss_matchup_LUT.pickle', 'rb'))
rental_matchups = pickle.load(open(base_dir+'/data/rental_matchup_LUT.pickle', 'rb'))
rental_scores = pickle.load(open(base_dir+'/data/rental_pokemon_scores.pickle', 'rb'))

# Test retrieval of a rental Pokemon
rental_pokemon['stunfisk-galar'].print_verbose()
print('________________________________________')

# Test retrieval of a boss Pokemon
boss_pokemon['mewtwo'].print_verbose()
print('________________________________________')

# Test retrieval of rental Pokemon matchups
print(f'Matchup for Chansey against Golurk (poor): {rental_matchups["chansey"]["golurk"]}')
print(f'Matchup for Carkol against Butterfree (good): {rental_matchups["carkol"]["butterfree"]}')
print('________________________________________')

# Test retrieval of boss Pokemon matchups
print(f'Matchup for Jynx against Heatran (poor): {boss_matchups["jynx"]["heatran"]}')
print(f'Matchup for Golurk against Raikou (good): {boss_matchups["golurk"]["raikou"]}')
print('________________________________________')

# Test retrieval of rental Pokemon scores
print(f'Score for Jigglypuff (poor): {rental_scores["jigglypuff"]}')
print(f'Score for Doublade (good): {rental_scores["doublade"]}')
print('________________________________________')

# Test move selection
print('Wide Guard utility:')
matchup_scoring.print_matchup_summary(
rental_pokemon['pelipper'], boss_pokemon['groudon'], rental_pokemon
)
salazzle = rental_pokemon['salazzle']
print('Regular matchup:')
matchup_scoring.print_matchup_summary(
salazzle, boss_pokemon['kartana'], rental_pokemon
)
print('Max move scores:')
salazzle.dynamax = True
matchup_scoring.print_matchup_summary(
salazzle, boss_pokemon['kartana'], rental_pokemon
)



if __name__ == '__main__':
main()

0 comments on commit 79be95a

Please sign in to comment.