змея шевелится корректно ест, но валидацию не проходит
public  void move(int x, int y){
      SnakeSection head = sections.get(0);
      head = new SnakeSection(head.getX() + x, head.getY() + y);


      checkBorders(head);
      if (!isAlive) return;

      checkBody(head);
      if (!isAlive) return;

  Mouse mouse = Room.game.getMouse();
      if (head.getX() == mouse.getX() && head.getY() == mouse.getY()) // съела
      {
          sections.add(0, head);                  // Добавили новую голову
          Room.game.eatMouse();
          //sections.remove(sections.size() - 1); // Хвост не удаляем, но создаем новую мышь.
      } else // просто движется
      {
          sections.add(0, head);                  // добавили новую голову
          sections.remove(sections.size() - 1);   // удалили последний элемент с хвоста
      }
  }

public void checkBorders(SnakeSection head){
      isAlive = head.getX() > -1 && head.getX() < Room.game.getWidth() && head.getY() > -1 && head.getY() < Room.game.getHeight();

  }
  public void checkBody(SnakeSection head){
      if (!sections.contains(head)) {
          isAlive = false;
      }
  }