Implemented player collision detection