Test createNewCell() stupide begrünen
This commit is contained in:
parent
3bfcb3cdca
commit
41e60e145b
BIN
out/production/GameOfLifeAssignment/ILife.class
Normal file
BIN
out/production/GameOfLifeAssignment/ILife.class
Normal file
Binary file not shown.
BIN
out/production/GameOfLifeAssignment/Life.class
Normal file
BIN
out/production/GameOfLifeAssignment/Life.class
Normal file
Binary file not shown.
BIN
out/test/GameOfLifeAssignment/LifeTest.class
Normal file
BIN
out/test/GameOfLifeAssignment/LifeTest.class
Normal file
Binary file not shown.
@ -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;
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user