Implemented piece collision detection.