This code helps to identify the intersection of two objects on the game screen.
Here each image is assumed to be in rectangle. Hence all the sprites will be in rectangle, the invisible parts intersection will also be considered as intersection and intersection result will be produced.