All Test Working
This commit is contained in:
parent
09a0356235
commit
a8f240a914
@ -55,6 +55,19 @@ public class LifeTest {
|
||||
|
||||
@Test
|
||||
public void destroyCrowdedCell() {
|
||||
// Arrange: drei lebende Zellen
|
||||
Life l = new Life();
|
||||
l.setAlive(0, 0);
|
||||
l.setAlive(0, 1);
|
||||
l.setAlive(0, 2);
|
||||
l.setAlive(1, 0);
|
||||
l.setAlive(1, 1);
|
||||
|
||||
// Act: Berechnung der Folgegeneration
|
||||
ILife nextGen = l.nextGeneration();
|
||||
|
||||
// Assert: Rasterpunkt mit drei Nachbarn sollte jetzt leben
|
||||
assertTrue(!nextGen.isAlive(0, 1));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user