-
Notifications
You must be signed in to change notification settings - Fork 2
E2E Test #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2E Test #79
Conversation
It was erasing text instead of coloring it orange.
I do not have vscode set up. There might be some kind of tool that does something similar (I run the test in the terminal currently) |
I'll try and get some work done on this once I get out of school |
Chiseling away. Did you want A list makes more sense, because ordering can be preserved, but you'll have to handle duplicates manually. |
Yeah a list is what the new system will require since the previous one was a giant dictionary of every possible buff/debuff the player or enemy could have and all of them were set to 0 or false by default. Struggling with the new implementation though. |
Ok, I'll see what I can do. But if it's not understandable, we can always go back. This is a pet project -- it doesn't have to be coded perfectly. :-p |
The main issue here is that Exampledef modify_value(value):
value += 10
my_value = 5
print(f"Value Before: {my_value}")
modify_value(my_value)
print(f"Value After: {my_value}")
#--------------------------------------------
def modify_obj(obj):
obj.value += 10
class MyObj:
def __init__(self, value):
self.value = value
my_obj = MyObj(5)
print(f"Object.Value Before: {my_obj.value}")
modify_obj(my_obj)
print(f"Object.Value After: {my_obj.value}") If you run this, you'll get:
Showing that the object can be modified but the integer can't. SolutionSo because of that, if you want something (like damage or block or health) to be modified, it has to be passed inside an object. That's why the player attack (using a card object) works but the enemy attack doesn't. Then, on the receiving end, we just need to do two things:
I'll take a first crack at it. |
This test is brittle. We need something better.
Slow and steady. On the bright side, it looks like 2 out of the 10 end-to-end tests didn't crash. 👍 |
Effect must be an Effect class. You passed "Strength Down"
I missed a few things in the last commit. This commit finishes the job.
Need to make the relics work outside of this code
Sometimes the tests pass, sometimes they don't. I think we still have a problem with randomness. But I got it to mostly work. |
I made a test that plays the game using mostly random inputs and I made it so that it runs the test 10 times. It's exposing lots of bugs.
I fixed one of the harder ones with the message bus -- it would act weird if a nested
publish()
was called.The other problems we'll have to work through together. If you have VSCode set up to run tests, it'll look like this: