Working
This commit is contained in:
+3
-17
@@ -23,6 +23,7 @@ import java.util.GregorianCalendar;
|
||||
import java.util.Iterator;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.Timer;
|
||||
|
||||
@@ -169,7 +170,7 @@ public class Panel extends JPanel implements ActionListener
|
||||
return new Wall(null);
|
||||
case 4:
|
||||
return new Food(null);
|
||||
case 6:
|
||||
case 5:
|
||||
return new Waypoint(null);
|
||||
default:
|
||||
return null;
|
||||
@@ -191,21 +192,6 @@ public class Panel extends JPanel implements ActionListener
|
||||
return waypoints;
|
||||
}
|
||||
|
||||
public int getNextTarget()
|
||||
{
|
||||
int last = 0;
|
||||
for (Waypoint w : waypoints)
|
||||
{
|
||||
System.out.println(waypoints);
|
||||
if (w.getSelf() > last)
|
||||
{
|
||||
last = w.getSelf();
|
||||
}
|
||||
}
|
||||
System.out.println(last);
|
||||
return last;
|
||||
}
|
||||
|
||||
public void addVisitors()
|
||||
{
|
||||
visitors.add(new Visitor("visitor", new Point(100, 300), agenda, objects));
|
||||
@@ -573,7 +559,7 @@ public class Panel extends JPanel implements ActionListener
|
||||
{
|
||||
return height;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user