@Override
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        if (this.getElements() == null) {
            return;
        }
        Collection<Player> players = Game.getInstance().getPlayers().values();

        int size = this.cols * this.rows;
        for (int index = 0; index < size; index++) {
            int x = this.getPosX(index);
            int y = this.getPosY(index);
            g.drawImage(this.sprite_floor, x, y, this);
        }

        for (int index = 0; index < size; index++) {
            int x = this.getPosX(index);
            int y = this.getPosY(index);

            Element element = this.getElements().get(index);
            if (element != null) {
                g.drawImage(element.getImage(), x, y, this);
            }

            if (this.fire.contains(index)) {
                g.drawImage(this.fire_image, x, y, this);
            }

            for (Player player : players) {
                if (player.getIndex() == index) {
                    if (player.getMovePogression() == 1) {
                        g.drawImage(player.getImage(), x, y, this);
                    } else {
                        int old_x = this.getPosX(player.getOldIndex());
                        int old_y = this.getPosY(player.getOldIndex());
                        int current_x = (old_x + (int) ((x - old_x) * player.getMovePogression()));
                        int current_y = (old_y + (int) ((y - old_y) * player.getMovePogression()));
                        g.drawImage(player.getImage(), current_x, current_y, this);
                    }
                }
            }
        }

    }