created CollisionDetector class and added collision functionality to entities and game classes