Init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class LifeTest {
|
||||
|
||||
@Test
|
||||
public void createNewCell() {
|
||||
|
||||
// Arrange: drei lebende Zellen
|
||||
Life l = new Life();
|
||||
l.setAlive(0, 0);
|
||||
l.setAlive(0, 1);
|
||||
l.setAlive(0, 2);
|
||||
|
||||
// Act: Berechnung der Folgegeneration
|
||||
ILife nextGen = l.nextGeneration();
|
||||
|
||||
// Assert: Rasterpunkt mit drei Nachbarn sollte jetzt leben
|
||||
assertTrue(nextGen.isAlive(1, 1));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void destroyLonelyCell() {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void keepAliveCell() {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void destroyCrowdedCell() {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user