diff --git a/build/built-jar.properties b/build/built-jar.properties index 85dcdc7..85e0b31 100644 --- a/build/built-jar.properties +++ b/build/built-jar.properties @@ -1,4 +1,4 @@ -#Fri, 08 Feb 2019 09:19:53 -0600 +#Fri, 08 Feb 2019 09:36:47 -0600 C\:\\Users\\cd109\\Desktop\\temp2\\CancerGrowth= diff --git a/build/classes/cancergrowth/Cell.class b/build/classes/cancergrowth/Cell.class index 084300d..31842ac 100644 Binary files a/build/classes/cancergrowth/Cell.class and b/build/classes/cancergrowth/Cell.class differ diff --git a/build/classes/cancergrowth/CellPanel$1.class b/build/classes/cancergrowth/CellPanel$1.class index 45709dc..62128bc 100644 Binary files a/build/classes/cancergrowth/CellPanel$1.class and b/build/classes/cancergrowth/CellPanel$1.class differ diff --git a/build/classes/cancergrowth/CellPanel$2.class b/build/classes/cancergrowth/CellPanel$2.class index c54dc76..adafa5e 100644 Binary files a/build/classes/cancergrowth/CellPanel$2.class and b/build/classes/cancergrowth/CellPanel$2.class differ diff --git a/build/classes/cancergrowth/CellPanel$3.class b/build/classes/cancergrowth/CellPanel$3.class index 62e09a0..ebd9ca7 100644 Binary files a/build/classes/cancergrowth/CellPanel$3.class and b/build/classes/cancergrowth/CellPanel$3.class differ diff --git a/build/classes/cancergrowth/CellPanel$4.class b/build/classes/cancergrowth/CellPanel$4.class index 8117c49..8fb972f 100644 Binary files a/build/classes/cancergrowth/CellPanel$4.class and b/build/classes/cancergrowth/CellPanel$4.class differ diff --git a/build/classes/cancergrowth/CellPanel.class b/build/classes/cancergrowth/CellPanel.class index 3233701..15ffbae 100644 Binary files a/build/classes/cancergrowth/CellPanel.class and b/build/classes/cancergrowth/CellPanel.class differ diff --git a/src/cancergrowth/Cell.java b/src/cancergrowth/Cell.java index 2f0e240..b6a904d 100644 --- a/src/cancergrowth/Cell.java +++ b/src/cancergrowth/Cell.java @@ -28,6 +28,7 @@ public class Cell extends Object private static final BufferedImage p2; private static final BufferedImage p3; private static final BufferedImage p4; + int splits = 0; static { @@ -168,6 +169,7 @@ public class Cell extends Object { if (currentStage == 3) { + splits ++; // If we need to split this code runs int width = (int) (-50 + Math.random() * 101); //randomize splitting direction int height = (int) (-50 + Math.random() * 101); diff --git a/src/cancergrowth/CellPanel.java b/src/cancergrowth/CellPanel.java index 7eb35f7..d2bfa1c 100644 --- a/src/cancergrowth/CellPanel.java +++ b/src/cancergrowth/CellPanel.java @@ -80,6 +80,10 @@ public class CellPanel extends javax.swing.JPanel implements ActionListener, Cha if (t != rec) { cells.add(rec); // If performing the simulation results in a new daughter cell, add it to the list } + if(t.splits > 10) { // IF the cels splits too much, it dies + cells.remove(t); + k--; + } } //growing = true; if(!kill) count ++; // Count how many hours have passed