/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package maze; import java.awt.Color; import java.awt.Graphics; import java.awt.Point; import java.util.LinkedList; import javax.swing.JFrame; import javax.swing.JPanel; /** * * @author Diana */ public class MazeDrawer extends JPanel{ int maze[][]; int width; LinkedList väg; public MazeDrawer(int[][] maze){ this.maze = maze; this.width = maze.length; MazeSolver s = new MazeSolver(maze); väg = s.solve(); } public void paintComponent(Graphics g){ int size = 80; g.setColor(Color.green); g.fillRect(0,0,width*size,width*size); g.setColor(Color.blue); for(int y=0; y