Implemented pixel perfect collision algorithm