Skip to content

Commit ba3d7d6

Browse files
committed
Code should function as it did before
1 parent 014cedb commit ba3d7d6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Pixelife.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
* Pixelife class
1212
* Manages GUI and pixel painting
1313
* @author Nic Manoogian <[email protected]>
14-
* @author Mike Lyons
14+
* @author Mike Lyons <[email protected]>
1515
*/
1616
public class Pixelife extends JPanel
1717
{
1818
private BufferedImage canvas;
1919
private static PixGrid myGrid;
20-
private Spawner line_spawner;
20+
//private Spawner line_spawner;
21+
private Spawner spawner;
2122
private int width;
2223
private int height;
2324

@@ -34,8 +35,9 @@ public Pixelife(int w, int h, int n)
3435
height = h;
3536

3637
myGrid = new PixGrid(w, h, n);
37-
line_spawner = new Spawner(DirectedPix.class, myGrid, 0, h/2);
38-
// /spawner.spawn(10);
38+
//line_spawner = new Spawner(DirectedPix.class, myGrid, 0, h/2);
39+
spawner = new Spawner(PulsePix.class, myGrid);
40+
spawner.spawn(10);
3941
}
4042

4143
public Dimension getPreferredSize()
@@ -58,7 +60,8 @@ public void run()
5860
while(true)
5961
{
6062
myGrid.update();
61-
line_spawner.update();
63+
//line_spawner.update();
64+
spawner.update();
6265

6366
draw();
6467

0 commit comments

Comments
 (0)