private void setNextTokens(int nextType, int[][] nextTokensPosition, TokenNext[][] nextTokens) {
        switch (nextType) {
            case 1:// the I token
                setPositionForCase1(nextTokensPosition, 0);
                break;
            case 2:// the J token
                setPositionForCase2(nextTokensPosition, 0);
                break;
            case 3:// the L token
                setPositionForCase3(nextTokensPosition, 0);
                break;
            case 4:// the O token
                setPositionForCase4(nextTokensPosition, 0);
                break;
            case 5:// the S token
                setPositionForCase5(nextTokensPosition, 0);
                break;
            case 6:// the T token
                setPositionForCase6(nextTokensPosition, 0);
                break;
            default:// the Z token
                setPositionForCase7(nextTokensPosition, 0);
        }

        //reset nextTokens
        for (int i = 0; i < nextTokens.length; i++) {
            for (int j = 0; j < nextTokens[i].length; j++) {
                nextTokens[i][j].setType(0);
            }
        }
        for (int i = 0; i < nextTokensPosition.length; i++) {
            int x = nextTokensPosition[i][0];
            int y = nextTokensPosition[i][1];
            nextTokens[y][x].setType(nextType);
        }
    }