From 41e60e145bb7d7fe9727c68b359f5db546be1128 Mon Sep 17 00:00:00 2001 From: Susanne Date: Sat, 15 Feb 2025 18:10:00 +0100 Subject: [PATCH] =?UTF-8?q?Test=20createNewCell()=20stupide=20begr=C3=BCne?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- out/production/GameOfLifeAssignment/ILife.class | Bin 0 -> 223 bytes out/production/GameOfLifeAssignment/Life.class | Bin 0 -> 1290 bytes out/test/GameOfLifeAssignment/LifeTest.class | Bin 0 -> 938 bytes src/Life.java | 11 +++++------ test/LifeTest.java | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 out/production/GameOfLifeAssignment/ILife.class create mode 100644 out/production/GameOfLifeAssignment/Life.class create mode 100644 out/test/GameOfLifeAssignment/LifeTest.class diff --git a/out/production/GameOfLifeAssignment/ILife.class b/out/production/GameOfLifeAssignment/ILife.class new file mode 100644 index 0000000000000000000000000000000000000000..f07867db766a8a4e083b0da4867d90f8f7146779 GIT binary patch literal 223 zcmYk0I|{-;5QhIz<7#~67_l)2unLM22v`Ufc557EkaBMB19Zq+I-i^!Hnu_HxOp;ns zA}v`Tr82kw*`6?V{3zG#xX`7!Izm63rj6m8;BT+@BIA{@^38A5SxwL-h@Bt;o=|z{ YqNY>mHM#%GJ_b!c#7H*9OJWO?FI+$?CIA2c literal 0 HcmV?d00001 diff --git a/out/production/GameOfLifeAssignment/Life.class b/out/production/GameOfLifeAssignment/Life.class new file mode 100644 index 0000000000000000000000000000000000000000..f4fc0aa12c178ce9f8777406f05e7895192014e5 GIT binary patch literal 1290 zcma)6OHUI~7(I7p+G%SkwLnp6r66b@QWOQ$0*V+-ld6jvlIm(GV;Lw@Ql%UKYJr=OILhZi!-(l-)D zFQR-|-n(lxNhH*-|=yq$v zT&&k+g1!(`426+El8ox6U31plh@vzMhmpbv4b?THxkxB2UCb=WxN~8QVO$`vZ90o} zYsX}T>0&Xntm6Vjmm1wS4U1&8rN$~9dP|mVK4@*On9WDVN}ZZmsZllR%SO|ZcTcGq z&Du7Z{iP`aqE0p?w{YS*YZg7lE}tTwXUt4Ktu29`vSU;??i*V!sE!GiP17CISfylb zALaa*NV2~iO}Wu(R?WMXBo~xf@^Ua3VZ|{%=Q;ZTf=DCGTZXrF_@VHfe+y9wyoXv* zW4>}llZP*+mn(iL={ybym}{fw14QXHBNSwLM%ZP*hjD~3!3pMgi+2!lks8nvL>`mO zC**{^yao3T1hWS?nQbF}95Mops}n%fg_LyZj7tQ93-q&qcO;-uH%p+?>U<)1xQ_{S zA(=}|wQ*)2Llly2oQB5cXDMul}WtHMrEBvlv_(%&xw*_2ZFYqRVxl>dA2%6HRrgW((U26P(cxbnYAp0DWyUJ;oa<96mA=fg^ X8P2%KogEB$$N^e!csp2dW9EJU2g2NN5Ir|`;?!}{G?b+Ul0pk)DK$J7Aw`iukxY>wibUU>WLj=;ZRDk;k9-m@ zEsMkl@KK1lwoBkCwmiGfoVj;?{r>(FzyME86rdTv#CQLzZA1byj=B2ufDB=oz5X?BY>PVjsl9LIABX{C)q~Qcp*BiT`RDK@R z-bI6VSJ zt~-k%6hVeqo3Rdqb0_f0JI{JlKM;LP&m!|1dCedU&So^rg67*G38(Zzs&T4UjQ7-a z;vSlO%jzkD4;UquTkP4ag^G4BA-=Ft;8LV%K*xQyt*ijs*kMoL0cQ*8&!3_33-o@# zcz1~vr>AKbFngMw%A%4NsJ+_N^>1is_=;PL7EN9az(g4p)VRqys@UXBY4I*}*;B2z zGWfi8ne{_FVhSy;Z==IBx?H7Z>9H2r{Yx$LIksr1%D@}6m`UWo|ARbU4$@o-vbP*$ Mdnt&`d<%H;2Z&yl^Z)<= literal 0 HcmV?d00001 diff --git a/src/Life.java b/src/Life.java index 84ab855..7048091 100644 --- a/src/Life.java +++ b/src/Life.java @@ -1,5 +1,6 @@ public class Life implements ILife { - + + public static void main(String[] args) { Life l = new Life(new String[] { " ", " ", @@ -32,7 +33,6 @@ public class Life implements ILife { @Override public void setAlive(int x, int y) { // TODO Auto-generated method stub - } @Override @@ -43,13 +43,12 @@ public class Life implements ILife { @Override public boolean isAlive(int x, int y) { - // TODO Auto-generated method stub - return false; + return true; } @Override public ILife nextGeneration() { - // TODO Auto-generated method stub - return null; + Life next = new Life(); + return next; } } \ No newline at end of file diff --git a/test/LifeTest.java b/test/LifeTest.java index 3940e66..381c898 100644 --- a/test/LifeTest.java +++ b/test/LifeTest.java @@ -17,6 +17,7 @@ public class LifeTest { // Assert: Rasterpunkt mit drei Nachbarn sollte jetzt leben assertTrue(nextGen.isAlive(1, 1)); + // TEST GRÜN WENN nextGen!=null UND isAlive==true }