I've been trying to write code when the coordinates cx/cy intersect with a rectangle/s the rectangle changes color. This has been driving me up the wall. Here is my code for the rectangles.
for(int k = 0; k<=15; k++){
k = k * 55;
for(int i=0;i<=9;i++){
i = i*55;
bounds.set(left+i,top+k,right+i,bottom+k);
paint.setColor(Color.WHITE);
canvas.drawRect(bounds, paint);
if (cx == left || cx == right || cy==top|| cy == bottom){
paint.setColor(Color.DKGRAY);
canvas.drawRect(bounds, paint);
}
i=i/55;
}
k = k/55;
}