Avoid overriding of equals and hashCode methods
1 | // import java.util.*; |
Overriding of equals and hashCode methods with Point class
1 | class SnakeGame { |
java.awt.Point
1 | import java.awt.Point; |
1 | /* use list to avoid implementation of overriding equals and hashcode methods, but too complex. |
1 | /* <- Can't use this code because can't override the equals method in array -> |