finished gridCreation and started nextGen
This commit is contained in:
parent
aca09f1bc8
commit
447e9f74bc
|
|
@ -50,15 +50,32 @@ public class Simulator extends Thread {
|
|||
}
|
||||
public int[][] gridCreation() {
|
||||
int[][] newGrid = new int[COL_NUM][LINE_NUM];
|
||||
//create the grid
|
||||
for (int x = 0; x < COL_NUM; x ++) {
|
||||
for (int y = 0; y < LINE_NUM; y ++) {
|
||||
//TODO set cell values
|
||||
|
||||
if (grid[x][y] == 0)
|
||||
System.out.print("0");
|
||||
else
|
||||
System.out.print("1");
|
||||
//create cell
|
||||
//cest fait jpeux pas enlever le todo
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
return newGrid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO create a new generation
|
||||
public int[][] nextGen(int gridCreation[][], int COL_NUM, int LINE_NUM){
|
||||
int[][] future = new int[COL_NUM][LINE_NUM];
|
||||
for (int x = 0; x < COL_NUM; x++) {
|
||||
for (int y = 0; y < LINE_NUM; y++) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getWidth() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue