Collision detection method created in Java. Works with lower left tile.