From 68fc76793f7478727df3f5450f80d49f39499b5e Mon Sep 17 00:00:00 2001 From: Saskia Date: Sat, 15 Feb 2025 15:42:32 +0100 Subject: [PATCH] Zwischen-Commit 01 (setAlive fertig) --- src/Life.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Life.java b/src/Life.java index 84ab855..b561cf9 100644 --- a/src/Life.java +++ b/src/Life.java @@ -1,4 +1,7 @@ public class Life implements ILife { + + private final int GRIDSIZE = 5; + private boolean[][] grid = new boolean[GRIDSIZE][GRIDSIZE]; public static void main(String[] args) { Life l = new Life(new String[] { " ", @@ -32,7 +35,7 @@ public class Life implements ILife { @Override public void setAlive(int x, int y) { // TODO Auto-generated method stub - + grid[x][y] = true; } @Override @@ -50,6 +53,13 @@ public class Life implements ILife { @Override public ILife nextGeneration() { // TODO Auto-generated method stub + Life nextLife = new Life(); + + for(int y = 0; y < GRIDSIZE; y++){ + for(int x = 0; x < GRIDSIZE; x++){ + + } + } return null; } } \ No newline at end of file