private void paintPlayers(Graphics g)
    {
        Graphics2D g2D = (Graphics2D) g;
        for (PlayerLocation location : locations) {
            String imageName = "/images/" + location.getImageName() + ".png";
            int x = location.getX();
            
            if (x > (columns - 3) * pixels) {
                x = x - (columns - 2) * pixels;
            }
            
            try {
                Image image = new ImageIcon(this.getClass().getResource(imageName)).getImage();
                if (x > -17) {
                    g2D.drawImage(image, x, location.getY(), this);
                }
                
                if (x < pixels) {
                    g2D.drawImage(image, x + (columns - 2) * pixels, location.getY(), this);
                    g2D.setColor(Color.BLACK);
                    int height = (int) getSize().getHeight();
                    g2D.fillRect(0, 0, pixels, height);
                    g2D.fillRect((columns - 1) * pixels, 0, pixels, height);
                }
            } catch (NullPointerException error) {
                System.out.println("no carga la imagen: " + imageName);
            }    
        }
        
        if (gameOver) {
            paintGameOver(g2D);
        }
        
        if (pacManWin) {
            paintVictory(g2D);
        }
        Toolkit.getDefaultToolkit().sync();
        g.dispose();
    }