docs
This commit is contained in:
@@ -33,6 +33,12 @@ public class GomokuBoard{
|
||||
this(width, height, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor take the width and the height to creat a board of gomoku.
|
||||
* @param width Size of width.
|
||||
* @param height Size of height.
|
||||
* @param colors Is colors of cells after load a game.
|
||||
*/
|
||||
public GomokuBoard(int width, int height, Color[][] colors){
|
||||
this.firstCell = new GomokuCell(Color.NIL);
|
||||
this.boardWidth = width;
|
||||
@@ -41,6 +47,12 @@ public class GomokuBoard{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method gen all cells in the board and link each other.
|
||||
* @param width Size of width.
|
||||
* @param height Size of height.
|
||||
* @param colors Array of Color.
|
||||
*/
|
||||
private void genCells(int width, int height, Color[][] colors){
|
||||
this.firstCell = new GomokuCell(colors == null ? Color.NIL : colors[0][0]);
|
||||
GomokuCell act = this.firstCell;
|
||||
|
||||
Reference in New Issue
Block a user