public void drawMap(Graphics graphics){
        if (this.background != null){
            graphics.drawImage(background, this.position.x, this.position.y, null);

        }
            if ((grid != null) && (showGrid)){
                grid.paintComponent(graphics);
            }
            
        if (showGridEditor){
//    private ArrayList<MapObstacle> obstacles = new ArrayList<MapObstacle>();
//    private ArrayList<MapPortal> portals = new ArrayList<MapPortal>();
//    private ArrayList<Point> items = new ArrayList<Point>();

            for (MapObstacle obstacle : obstacles) {
                Point systemCoordinate = grid.getCellPosition(obstacle.getLocation());
                systemCoordinate.x += (grid.getCellWidth() / 4);
                systemCoordinate.y += (grid.getCellHeight() * 3 / 4) ;
                
                graphics.drawString("O", systemCoordinate.x, systemCoordinate.y);
            }
            
            for (MapPortal portal : portals) {
                Point systemCoordinate = grid.getCellPosition(portal.getLocation());
                systemCoordinate.x += (grid.getCellWidth() / 4);
                systemCoordinate.y += (grid.getCellHeight() * 3 / 4) ;
                
                graphics.drawString("P", systemCoordinate.x, systemCoordinate.y);
            }
            
            for (MapItem item : items) {
                Point systemCoordinate = grid.getCellPosition(item.getLocation());
                systemCoordinate.x += (grid.getCellWidth() / 4);
                systemCoordinate.y += (grid.getCellHeight() * 3 / 4) ;
                
                graphics.drawString("I", systemCoordinate.x, systemCoordinate.y);
            }
            
 
        }    
        
    }