Code for function canCollideWith and hitTest. Structure for Player, Enemy, Bullet, Bonus, InfiniteBackground, Animation and BulletFactory.