Skip to content
Snippets Groups Projects
Commit 1ee33964 authored by NGUYEN Thi hang's avatar NGUYEN Thi hang
Browse files

THN

parent c94ace50
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ package model; ...@@ -3,6 +3,7 @@ package model;
import com.sun.prism.paint.Color; import com.sun.prism.paint.Color;
public class ComputerPlayer implements Player{ public class ComputerPlayer implements Player{
PlayStrate sdfdsfdsfm
@Override @Override
public boolean isHuman() { public boolean isHuman() {
return false; return false;
......
...@@ -10,8 +10,14 @@ import java.util.List; ...@@ -10,8 +10,14 @@ import java.util.List;
public class GrayCell extends AbstractCell{ public class GrayCell extends AbstractCell{
Cell[][] cells; Cell[][] cells;
int dim; int nberOfRows;
public GrayCell(Cell[][] cells, int dim){ 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{ ...@@ -26,8 +32,13 @@ public class GrayCell extends AbstractCell{
@Override @Override
public List<Cell> getNeighbours() { public List<Cell> getNeighbours() {
List<Cell> neighbours= new ArrayList<Cell>(); 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{ ...@@ -38,6 +49,7 @@ public class GrayCell extends AbstractCell{
*/ */
@Override @Override
public void setNeighbours(List<Cell> cells) { public void setNeighbours(List<Cell> cells) {
this.neighbours=cells;
} }
......
...@@ -35,6 +35,8 @@ public class SquareCell extends AbstractCell{ ...@@ -35,6 +35,8 @@ public class SquareCell extends AbstractCell{
*/ */
@Override @Override
public List<Cell> getNeighbours() { public List<Cell> getNeighbours() {
return this.neighbours; return this.neighbours;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment