private void nextMove(int type) {
        if (type == 0) {
            holdable = true;
            generateNextTokens();
        } else {
            currentType = type;
        }
        //set currentTokens
        switch (currentType) {
            case 1:// the I token
                setPositionForCase1(currentTokens, 3);
                rotater = new RotaterI(tokens);
                break;
            case 2:// the J token
                setPositionForCase2(currentTokens, 3);
                rotater = new RotaterJ(tokens);
                break;
            case 3:// the L token
                setPositionForCase3(currentTokens, 3);
                rotater = new RotaterL(tokens);
                break;
            case 4:// the O token
                setPositionForCase4(currentTokens, 3);
                rotater = new RotaterO(tokens);
                break;
            case 5:// the S token
                setPositionForCase5(currentTokens, 3);
                rotater = new RotaterS(tokens);
                break;
            case 6:// the T token
                setPositionForCase6(currentTokens, 3);
                rotater = new RotaterT(tokens);
                break;
            default:// the Z token
                setPositionForCase7(currentTokens, 3);
                rotater = new RotaterZ(tokens);
        }

        if (checkIsLose()) {
            lose();
            return;
        }

        //set type for the currentToken
        setCurrentTokens(currentType);
        setDirectingTokens();
        rotateCount = 0;
        refresh();
    }