diff --git a/tp3/Grid.java b/tp3/Grid.java
index 939e05fd8e4207e92eb7ffaedebfcd6d4d0f6d0b..22ca2a69e27dcb0155d5e8cf0db7906122a97d52 100644
--- a/tp3/Grid.java
+++ b/tp3/Grid.java
@@ -1,7 +1,4 @@
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
 
 /**
  * {@code Grid} instances represent the grid in <i>The Game of Life</i>.
@@ -98,29 +95,61 @@ public class Grid implements Iterable<Cell> {
     }
 
     private boolean[][] calculateNextStates() {
-        return null;
+        boolean[][] array = new boolean[getNumberOfRows()][getNumberOfColumns()];
+        for (int collum = 0; collum < getNumberOfColumns(); collum++) {
+            for (int row = 0; row < getNumberOfRows(); row++) {
+                array[row][collum] = calculateNextState(row,collum,getCell(row,collum));
+            }
+        }
+        return array;
     }
 
     private boolean calculateNextState(int rowIndex, int columnIndex, Cell cell) {
-	return false;
+	   return cell.isAliveInNextState(countAliveNeighbours(rowIndex,columnIndex));
     }
 
     private int countAliveNeighbours(int rowIndex, int columnIndex) {
-        return 0;
+        int numCellAlive = 0;
+        for (Cell cell : getNeighbours(rowIndex,columnIndex)){
+            if(cell.isAlive()){
+                numCellAlive ++;
+            }
+        }
+        return numCellAlive;
     }
 
 
     private List<Cell> getNeighbours(int rowIndex, int columnIndex) {
-	return null;
+        List<Cell> neighboursList = new ArrayList<>();
+        neighboursList.add(getCell(rowIndex+1,columnIndex));
+        neighboursList.add(getCell(rowIndex-1,columnIndex));
+        neighboursList.add(getCell(rowIndex,columnIndex+1));
+        neighboursList.add(getCell(rowIndex,columnIndex-1));
+        neighboursList.add(getCell(rowIndex+1,columnIndex+1));
+        neighboursList.add(getCell(rowIndex-1,columnIndex-1));
+        neighboursList.add(getCell(rowIndex-1,columnIndex+1));
+        neighboursList.add(getCell(rowIndex+1,columnIndex-1));
+        return neighboursList;
+
     }
 
     private void goToNextState(boolean[][] nextState) {
+        boolean[][] array = nextState;
+        for (int collum = 0; collum < getNumberOfColumns(); collum++) {
+            for (int row = 0; row < getNumberOfRows(); row++) {
+                if(array[row][collum]){
+                    cells[row][collum].setAlive();
+                }
+                else cells[row][collum].setDead();
+            }
+        }
     }
 
     /**
      * Sets all {@link Cell}s in this {@code Grid} as dead.
      */
     void clear() {
+
     }
 
     /**
@@ -131,6 +160,7 @@ public class Grid implements Iterable<Cell> {
      */
  
     void randomGeneration(Random random) {
+
     }
 
 }