diff --git a/doc/Cardinal.html b/doc/Cardinal.html index c8677e7..c2314aa 100644 --- a/doc/Cardinal.html +++ b/doc/Cardinal.html @@ -1,7 +1,7 @@ - + Cardinal diff --git a/doc/Color.html b/doc/Color.html index b6540a9..a288c32 100644 --- a/doc/Color.html +++ b/doc/Color.html @@ -1,7 +1,7 @@ - + Color diff --git a/doc/Coordinate.html b/doc/Coordinate.html index 2cf9cae..3218257 100644 --- a/doc/Coordinate.html +++ b/doc/Coordinate.html @@ -1,7 +1,7 @@ - + Coordinate diff --git a/doc/GomokuAI.html b/doc/GomokuAI.html index b6dbe1b..6627d39 100644 --- a/doc/GomokuAI.html +++ b/doc/GomokuAI.html @@ -1,7 +1,7 @@ - + GomokuAI diff --git a/doc/GomokuBoard.html b/doc/GomokuBoard.html index 62c8cbd..8cee5eb 100644 --- a/doc/GomokuBoard.html +++ b/doc/GomokuBoard.html @@ -1,7 +1,7 @@ - + GomokuBoard diff --git a/doc/GomokuCell.html b/doc/GomokuCell.html index 11571c1..27f3dd1 100644 --- a/doc/GomokuCell.html +++ b/doc/GomokuCell.html @@ -1,7 +1,7 @@ - + GomokuCell @@ -159,7 +159,7 @@ loadScripts(document, 'script');
EnumMap<Cardinal, GomokuCell>
getAllNeighbour()
-
Return neighbour.
+
Return neighbours.
GomokuCell
getNeighbour(Cardinal car)
@@ -194,7 +194,9 @@ loadScripts(document, 'script');
void
setState(Color c)
-
 
+
+
Change state of the current cell.
+
String
toString()
 
@@ -282,10 +284,10 @@ loadScripts(document, 'script');

getAllNeighbour

public EnumMap<Cardinal, GomokuCell> getAllNeighbour()
-
Return neighbour.
+
Return neighbours.
Returns:
-
The EnumMap of neighbour.
+
The EnumMap of neighbours.
@@ -308,6 +310,13 @@ loadScripts(document, 'script');

setState

public void setState(Color c)
+
Change state of the current cell.
+
+
Parameters:
+
c - The color of the token played.
+
Throws:
+
IllegalStateException - If the cell is not playable.
+
diff --git a/doc/GomokuGame.html b/doc/GomokuGame.html index 777f711..6e10767 100644 --- a/doc/GomokuGame.html +++ b/doc/GomokuGame.html @@ -1,7 +1,7 @@ - + GomokuGame diff --git a/doc/Human.html b/doc/Human.html index 8b1a811..0963ccc 100644 --- a/doc/Human.html +++ b/doc/Human.html @@ -1,7 +1,7 @@ - + Human diff --git a/doc/Player.html b/doc/Player.html index c79d057..b67e296 100644 --- a/doc/Player.html +++ b/doc/Player.html @@ -1,7 +1,7 @@ - + Player diff --git a/doc/allclasses-index.html b/doc/allclasses-index.html index 705de20..f312e67 100644 --- a/doc/allclasses-index.html +++ b/doc/allclasses-index.html @@ -1,7 +1,7 @@ - + All Classes and Interfaces diff --git a/doc/allpackages-index.html b/doc/allpackages-index.html index 85f3568..42d919b 100644 --- a/doc/allpackages-index.html +++ b/doc/allpackages-index.html @@ -1,7 +1,7 @@ - + All Packages diff --git a/doc/constant-values.html b/doc/constant-values.html index 6695bae..b9a54dc 100644 --- a/doc/constant-values.html +++ b/doc/constant-values.html @@ -1,7 +1,7 @@ - + Constant Field Values diff --git a/doc/help-doc.html b/doc/help-doc.html index 215de70..2acc609 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -1,7 +1,7 @@ - + API Help diff --git a/doc/index-all.html b/doc/index-all.html index 2a67660..9a3b69c 100644 --- a/doc/index-all.html +++ b/doc/index-all.html @@ -1,7 +1,7 @@ - + Index @@ -115,7 +115,7 @@ loadScripts(document, 'script');
 
getAllNeighbour() - Method in class GomokuCell
-
Return neighbour.
+
Return neighbours.
getBoard() - Method in class GomokuGame
 
@@ -230,7 +230,9 @@ loadScripts(document, 'script');
SE - Enum constant in enum class Cardinal
 
setState(Color) - Method in class GomokuCell
-
 
+
+
Change state of the current cell.
+
startGame() - Method in class GomokuGame
 
state - Variable in class GomokuCell
diff --git a/doc/index.html b/doc/index.html index b25e1bf..31a90d1 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,7 +1,7 @@ - + Generated Documentation (Untitled) diff --git a/doc/overview-tree.html b/doc/overview-tree.html index 8e7e280..8fa51cf 100644 --- a/doc/overview-tree.html +++ b/doc/overview-tree.html @@ -1,7 +1,7 @@ - + Class Hierarchy diff --git a/doc/package-summary.html b/doc/package-summary.html index 2aaa7f2..5b54422 100644 --- a/doc/package-summary.html +++ b/doc/package-summary.html @@ -1,7 +1,7 @@ - + Unnamed Package diff --git a/doc/package-tree.html b/doc/package-tree.html index 479ce63..288a39e 100644 --- a/doc/package-tree.html +++ b/doc/package-tree.html @@ -1,7 +1,7 @@ - + Class Hierarchy diff --git a/doc/search.html b/doc/search.html index 7937f1f..2bbc6e7 100644 --- a/doc/search.html +++ b/doc/search.html @@ -1,7 +1,7 @@ - + Search diff --git a/src/GomokuCell.java b/src/GomokuCell.java index 8aa551f..f023793 100644 --- a/src/GomokuCell.java +++ b/src/GomokuCell.java @@ -35,8 +35,8 @@ public class GomokuCell{ } /** - * Return neighbour. - * @return The EnumMap of neighbour. + * Return neighbours. + * @return The EnumMap of neighbours. */ public EnumMap getAllNeighbour(){ return neighbour; @@ -53,7 +53,9 @@ public class GomokuCell{ //------------------Sets-------------------------- /** - * + * Change state of the current cell. + * @param c The color of the token played. + * @throws IllegalStateException If the cell is not playable. */ public void setState(Color c){ if (!this.isPlayable()) @@ -86,7 +88,8 @@ public class GomokuCell{ */ public boolean isPlayable(){ for (Cardinal c : Cardinal.values()) { - if (this.getNeighbour(c).isPlayed()) return true; + GomokuCell current = this.getNeighbour(c); + if (current != null && current.isPlayed()) return true; } return false; }