public bool checkCollisionWithPlacedBlocks(Position[,] placedBlocks) { for (int x = GameUtilities.retrieveLeftValue(fakePosition.x, 1); x < GameUtilities.retrieveRightValue(fakePosition.x, 1); x++) { for (int y = GameUtilities.retrieveTopValue(fakePosition.y, 1); y < GameUtilities.retrieveBottomValue(fakePosition.y, 1); y++) { if (placedBlocks[x, y] != null) { if (fakePosition.positionRectangle.Intersects(placedBlocks[x, y].positionRectangle)) { return(true); } } } } return(false); }