title: How to check if a player has collided with any wall Java
body: <p>I am making a maze game and I am trying to implement a wall feature that will restrict the movement of a player if he collides with a wall. I have created a wall class so that I can implement multiple walls manually. The problem is my intersectsWith method which detects if a circle and a rectangle are colliding(player is a circle) takes in a player of type Player and a single wall of type Wall. How would I make it so that my method can detect collision to all the walls in the game and not just one so that if my player encounters any wall it would detect it? I feel like I need to use an ArrayList of walls or something like that.</p>