summaryrefslogtreecommitdiff
path: root/board.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'board.cpp')
-rw-r--r--board.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/board.cpp b/board.cpp
index b3820a0..91655dc 100644
--- a/board.cpp
+++ b/board.cpp
@@ -94,7 +94,7 @@ void Board::newEdgeCand(int idx) {
void Board::removeEdgeCell(int idx) {
// cerr << "(removeEdgeCell(" << Idx(idx) << "))" << endl;
int pos = inEdgeCells[idx];
- if (pos != -1) {
+ if (pos != -1 && (bd[idx] != 0 || !checkEdge(idx))) {
inEdgeCells[idx] = -1;
if ((unsigned)pos < edgeCells.size() - 1) {
int val = edgeCells[pos] = edgeCells.back();