What's wrong with my checkCollison(GameObject) method? It doesn't meet second and third requirement. By the way - the game works.
Here's my code:
public boolean checkCollision(GameObject field) {
for (GameObject part : snakeParts) {
if (field.x == part.x && field.y == part.y) {
return true;
}
}
return false;
}