'returns whether the position is empty and is surrounded by all stones of \'owner\''

def is_eyeish(self, position, owner):

    (x, y) = position
    if (self.board[(x, y)] != EMPTY):
        return False
    for (nx, ny) in self._neighbors(position):
        if (self.board[(nx, ny)] != owner):
            return False
    return True
