public boolean check(Stage _stage) {
        // Clone the stage because the algorithm will do some modify on the stage
        stage = _stage.clone();

        // Count the number of remained boxes
        int boxRemain = 0;
        for (ElementSet es : stage.getRawData())
            if (shouldCount(es))
                ++boxRemain;

        // Count touchable boxes
        Queue<Vector> queue = new ArrayDeque<Vector>();
        int touchableBox = 0;
        // We could map any vector in the game dimension to a positive int less than dim.getMax()
        boolean[] vis = new boolean[stage.info().getDim().getMax()];
        queue.offer(stage.player());
        vis[stage.player().getPos()] = true;
        // bfs algorithm
        while (!queue.isEmpty()) {
            Vector x = queue.poll();
            // Try each direction of the game dimension
            for (Vector v : x.getDim().getAllDirections()) {
                try {
                    Vector u = x.add(v);
                    if (vis[u.getPos()]) continue;
                    if (playerCannotMove(x, v)) continue;
                    queue.offer(u);
                    vis[u.getPos()] = true;
                    ElementSet es = stage.getPos(u);
                    if (shouldCount(es)) {
                        ++touchableBox;
                        es.del(Element.BOX);
                    }
                } catch (BoxMoverBaseException e) {
                    Utils.exit(e, logger, "");
                }
            }
        }

        // The player will never win if the two number are not equal
        return boxRemain != touchableBox;
    }