This round of changes involve updating the save files, fixing an issue in the UI_Handler.py file and having the objects that require the Knight and the BattleManager class import them from the file instead of making a dummy class of them. Further details regarding to each change can be found below.
Since the save files in use were from near the beginning of the project, they do not have all of the data that the Knight class now needs. As a result, they were updated to reflect the current Knight class.
There was a slight error in the UI_Handler.py file which had the code look for the save file meant to be used when the user clicked on "Continue" in the start screen. The path used was "Save/.." when the proper path was "save/..". In Windows this isn't an issue but on other platforms this would cause the game to crash.
At the beginning of the project I thought it was easier to make a Dummy Knight file that mimicked the Knight classes behavior. Unfortunately, I forgot to update the file that had the Dummy Knight class which led to the tests in the manager package that needed a Knight object to test it to be outdated. All files that require Knight or BattleManager objects now import the code directly, this ensures that the testing will always be up to date. All of the tests have been fixed and they now pass.
Note:
A test in BattleManager doesn't pass but that will be addressed later
PR checklist
[ ] All Pytests pass
[x] All changes are documented somewhere in the commit
[x] Rpg2.py is tested and works even with the changes
Pygame-RPG 15.2 Housekeeping and bugfixing
This round of changes involve updating the save files, fixing an issue in the
UI_Handler.py
file and having the objects that require theKnight
and theBattleManager
class import them from the file instead of making a dummy class of them. Further details regarding to each change can be found below.Since the save files in use were from near the beginning of the project, they do not have all of the data that the
Knight
class now needs. As a result, they were updated to reflect the currentKnight
class.There was a slight error in the
UI_Handler.py
file which had the code look for the save file meant to be used when the user clicked on "Continue" in the start screen. The path used was "Save/.." when the proper path was "save/..". In Windows this isn't an issue but on other platforms this would cause the game to crash.At the beginning of the project I thought it was easier to make a Dummy Knight file that mimicked the
Knight
classes behavior. Unfortunately, I forgot to update the file that had the Dummy Knight class which led to the tests in the manager package that needed aKnight
object to test it to be outdated. All files that requireKnight
orBattleManager
objects now import the code directly, this ensures that the testing will always be up to date. All of the tests have been fixed and they now pass.Note: A test in BattleManager doesn't pass but that will be addressed later
PR checklist