Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I found the definition of the class Point may be wrong. The type of x is double, and the method equals use "==" to judge whether a.x equals to b.x. I thought it will always be false.
In the context, I thought may type int be more fit for the issue! As following:
@Override
public boolean equals(Object obj) {
if (obj instanceof Point) {
Point other = (Point) obj;
return x == other.x && y == other.y;
} else {
return false;
}
}