Open boredompwndu opened 3 years ago
I'm not sure I like the idea of overriding equals. I don't know that I want the 2 brace tokens on a neb to be equal to each other, even if they are both green. Feels like a case of YAGNI. You ain't gonna need it. I know its cheap and easy to do, but I just wanted to bring it up.
I'm not pushing back hard enough to say don't do it though. I can't imagine a scenario where I'm checking equality anyway, so its likely harmless.
I feel obligated to point out that if you try to do (token == otherToken) you always get false because == on nonprimitives checks memory addresses. a .equals(other) will can be defined for equality. Same team on yagni though, so striking it from the issue
Requirements
It is not immediately clear in debugging the current status/type of tokens.
create a .toString() that tells the status and type of squadron
create a .equals() that checks the status/type of token of itself against a theoretically different token. (This likely has 0 use cases I just want to punch both of these out together and not think about it again later)Potential Solutions
see above
Potential Tasks
What does it take to call this issue complete?
Create toString()
Create equals(){DefenseToken.other}test that a token has equivalency to a separate but identical token, but not tokens that have different of each/both status/type (4 unit tests, do a punnett square I guess)