public int checkCollisions()
    {
        int check = -1;
        // Comprobamos primero que PacMan no haya chocado y si choca si se puede comer al fantasma
        for (Phantom phantom : phantoms) {
            if (checkTouch(pacMan, phantom)) {
                if (phantom.isEatable()) {
                    phantom.hasBeenEaten();
                    phantom.setExits(map.getEnvironmentOfCell(phantom.getRow(), phantom.getColumn()));
                    check = 1;
                } else {
                    return 0;
                }
            }
        }
        
        // Comprobamos si los fantasmas chocan entre si
        for (int i = 0; i < phantoms.size() - 1; i++) {
            for (int j = i + 1; j < phantoms.size(); j++) {
                Phantom first = phantoms.get(i);
                Phantom second = phantoms.get(j);
                
                if (!first.isAtHome() && !second.isAtHome() && directionsValids(first, second) &&
                    checkTouch(first, second)) {
                        first.swingDirection();
                        second.swingDirection();
                }
            }
        }
        return check;
    }