private static void HandleMarioCollisions(ICollisionHandler collisionHandler, IMario mario, Collection <IGameObject> blockList, Collection <IGameObject> enemyList, Collection <IGameObject> itemList, Collection <IGameObject> pipeList) { foreach (IGameObject obj in blockList) { collisionHandler.DetectMarioBlockCollisions(mario, obj); } collisionHandler.HandleMarioBlockCollisions(); foreach (IGameObject obj in enemyList) { collisionHandler.HandleCollision(mario, obj); } foreach (IGameObject obj in itemList) { collisionHandler.HandleCollision(mario, obj); } foreach (IGameObject obj in pipeList) { collisionHandler.HandleCollision(mario, obj); } }