Original Post
I am making a very simple 2D sandbox game, kind of a clone of Terraria. When the player clicks a block, I want it to delete. I'm not sure how I'm going to do this. The only way I could think was to make a Rectangle object surround the block, then using a for loop to cycle through every single block and check if the mouse's co-ordinates are contained in the Rectangle, but it seemed way too inefficient.
I'm using Java and Slick2D.
I'm using Java and Slick2D.