so what i do is i spawn in 1000 flowers with different Colors
and the flowers goes to the block its colliding with!
what i want to do is to check if there is a flower already colliding with that block and remove it from the list if this 2 diffrent flowers
are colliding!
for(Block b : PlayingState.blocks){
if(getObjectRect().intersects(b)){
if(this.xpos < b.x){
xpos = b.x;
}
if(this.xpos > b.x){
xpos = b.x;
}
if(this.ypos < b.y){
ypos = b.y;
}
if(this.ypos > b.y){
ypos = b.y;
}
if(xpos == b.x && ypos == b.y){
//LOOK IF THERE IS 2 IN THE SAME PLACE
//THEN REMOVE THE FIRST ONE AND MOVE SECOND ONE THERE INSTEAD
choosedLocation = true;
}
}
}
}