private boolean capture(int curX, int curY, int nextX, int nextY,
            ChessPiece cur) {
        Animal a = cur.getAnimal();
        ChessPiece target = board[nextX][nextY];
        Animal b = target.getAnimal();
        // return false if target chess piece has higher rank
        // unless cur is mouse or unless target is in trap
        if (cur.compareTo(target) < 0 && ! a.toString().equals("MOUSE")
                && ! inTrap(target, nextX, nextY)) {
            return false;
        }
        // mouse can only capture elephant and mouse
        // note a mouse cannot capture the other mouse unless they are either 
        // both in the river, or both on land
        if ((a.toString().equals("MOUSE")
                && !b.toString().equals("ELEPHANT") 
                && !b.toString().equals("MOUSE"))
                || (inRiver(curX, curY) != inRiver(nextX, nextY))){
            return false;
        }
        // elephant cannot capture mouse
        if (a.toString().equals("ELEPHANT") 
                && b.toString().equals("MOUSE")) {
            return false;
        }
        // capture target piece
        target.capture();
        return true;
    }