private boolean containsRover(Bidimensional position) { boolean contains = false; for (Rover rover : rovers) { contains = rover.getPosition().getAxisX() == position.getAxisX() && rover.getPosition().getAxisY() == position.getAxisY(); if (contains) break; } return contains; }
private boolean isInsideArea(Bidimensional position) { boolean axisXFits = area.getAxisX() >= position.getAxisX(); boolean axisYFits = area.getAxisY() >= position.getAxisY(); return axisXFits && axisYFits; }