Added puzzle dos and collision detection