is playable change
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import java.util.EnumMap;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import javax.smartcardio.Card;
|
||||
|
||||
/**
|
||||
* This class is cell of the board of the Gomoku game.
|
||||
*/
|
||||
@@ -83,7 +85,10 @@ public class GomokuCell{
|
||||
* @return True if the current cell can be played with the condition of the gomoku.
|
||||
*/
|
||||
public boolean isPlayable(){
|
||||
return this.neighbour.size() > 0;
|
||||
for (Cardinal c : Cardinal.values()) {
|
||||
if (this.getNeighbour(c).isPlayed()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user