Made methods to replace the code of cases in the big switch in
getSprites, made function to get the bounding box of 2 rectangles.