private void drawBoard(PathInfo path)
    {        
        for (int y = 0; y < board.getHeight(); y++)
        {
            for (int x = 0; x < board.getWidth(); x++)
            {
                Coordinates c = new Coordinates(x, y);
                boolean highlight = false;
                boolean visited = false;
                if (path != null)
                {
                    if (path.coordinates != null && path.coordinates.containsKey(c))
                        highlight = true;
                    
                    if (path.closedset != null && path.closedset.containsKey(c))
                        visited = true;
                }
                
                drawCell(c, board.getCellValue(c), highlight, visited);
            }
        }     
    }