Implemented collision check for queen