private boolean checkTouch(Player player1, Player player2) 
    {
        boolean collision = false;
        Integer widthPlayer1 = player1.getX() + player1.getWidth();
        Integer heightPlayer1 = player1.getY() + player1.getHeight();
        Integer widthPlayer2 = player2.getX() + player2.getWidth();
        Integer heightPlayer2 = player2.getY() + player2.getHeight();
        
        Integer width = Math.abs(widthPlayer1 - widthPlayer2) + 4;
        Integer height = Math.abs(heightPlayer1 - heightPlayer2) + 4;
        
        if (width < Math.max(player1.getWidth(), player2.getWidth()) &&
            height < Math.max(player1.getHeight(), player2.getHeight())) {
            collision = true;
        }
        
        return collision;
    }