diff options
author | yenatch <yenatch@gmail.com> | 2017-02-13 18:09:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 18:09:31 -0500 |
commit | 979c98a7c0f67ad6b9685b2d532c66a1f76ffb22 (patch) | |
tree | c67cc7b8500aac4e400d4e8bfdbef57a57b63eb1 /pokemontools/vba/autoplayer.py | |
parent | 74c620d01ad59bfb09cf4111ace549b925fcb9ab (diff) | |
parent | 766dea11bd63dee939db2b47198410e6c6e0fc7e (diff) |
Merge pull request #103 from eevee/py3
Python 3 compatibility, sort of, maybe
Diffstat (limited to 'pokemontools/vba/autoplayer.py')
-rw-r--r-- | pokemontools/vba/autoplayer.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pokemontools/vba/autoplayer.py b/pokemontools/vba/autoplayer.py index af14d47..2d2e8af 100644 --- a/pokemontools/vba/autoplayer.py +++ b/pokemontools/vba/autoplayer.py @@ -2,12 +2,14 @@ """ Programmatic speedrun of Pokémon Crystal """ +from __future__ import print_function +from __future__ import absolute_import import os import pokemontools.configuration as configuration # bring in the emulator and basic tools -import vba as _vba +from . import vba as _vba def skippable(func): """ @@ -394,13 +396,13 @@ class SpeedRunner(Runner): self.cry.text_wait() hp = self.cry.get_enemy_hp() - print "enemy hp is: " + str(hp) + print("enemy hp is: " + str(hp)) if hp == 0: - print "enemy hp is zero, exiting" + print("enemy hp is zero, exiting") break else: - print "enemy hp is: " + str(hp) + print("enemy hp is: " + str(hp)) attacks = attacks - 1 @@ -417,7 +419,7 @@ class SpeedRunner(Runner): # happens. self.cry.text_wait(max_wait=30, debug=True) - print "okay, back in the overworld" + print("okay, back in the overworld") cur_hp = ((self.cry.vba.memory[0xdd01] << 8) | self.cry.vba.memory[0xdd02]) move_pp = self.cry.vba.memory[0xdcf6] # move 1 pp |