diff --git a/app/src/main/java/model/ComputerPlayer.java b/app/src/main/java/model/ComputerPlayer.java index 7796e9c1bf37746562a0e38c4b13deeb92bf8e5b..a8699402c02b3c81f037f788be7b7dd71eeae6d0 100644 --- a/app/src/main/java/model/ComputerPlayer.java +++ b/app/src/main/java/model/ComputerPlayer.java @@ -3,6 +3,7 @@ package model; import com.sun.prism.paint.Color; public class ComputerPlayer implements Player{ + PlayStrate sdfdsfdsfm @Override public boolean isHuman() { return false; diff --git a/app/src/main/java/model/GrayCell.java b/app/src/main/java/model/GrayCell.java index b417d3f743eeb10dcb8eceb312333195f260f52a..830724a17e039797910444a406b0a985de1a6d57 100644 --- a/app/src/main/java/model/GrayCell.java +++ b/app/src/main/java/model/GrayCell.java @@ -10,8 +10,14 @@ import java.util.List; public class GrayCell extends AbstractCell{ Cell[][] cells; - int dim; - public GrayCell(Cell[][] cells, int dim){ + int nberOfRows; + int nberOfColums; + List<Cell> neighbours; + + public GrayCell(Cell[][] cells, int rows, int colums){ + this.cells=new Cell[rows][colums]; + this.nberOfRows=rows; + this.nberOfColums=colums; } @@ -26,8 +32,13 @@ public class GrayCell extends AbstractCell{ @Override public List<Cell> getNeighbours() { List<Cell> neighbours= new ArrayList<Cell>(); + for(int i=0; i< nberOfRows;i++){ + for(int j=0; j< nberOfColums;j++){ - return null; + } + } + + return neighbours; } /** @@ -38,6 +49,7 @@ public class GrayCell extends AbstractCell{ */ @Override public void setNeighbours(List<Cell> cells) { + this.neighbours=cells; } diff --git a/app/src/main/java/model/SquareCell.java b/app/src/main/java/model/SquareCell.java index 0ff9a94d25c73df68a997b7f1ffef5d053ed3852..d4941b2447a7d844e8924783f0ec6637fb7a131c 100644 --- a/app/src/main/java/model/SquareCell.java +++ b/app/src/main/java/model/SquareCell.java @@ -35,6 +35,8 @@ public class SquareCell extends AbstractCell{ */ @Override public List<Cell> getNeighbours() { + + return this.neighbours; }