public void move(boolean max, int m) {

        int start  = m;

        int finish = m + this.board[m];
        int loops  = (finish - start) / 13;

        if (max) {

            if (finish == 13) { finish++; }

            if (finish <= 12) {

                fillBeans(start + 1, finish);

            } else {

                fillBeans(start + 1, 12);

                while (loops > 0) {

                    fillBeans(0, 12);
                    loops--;

                }

                fillBeans(0, finish % 13);

            }

        } else {

            if (finish % 13 == 6) { finish++; }

            if (finish <= 13) {

                fillBeans(start + 1, finish);

            } else {

                fillBeans(start + 1, 13);

                while (loops > 0) {

                    fillBeans(0, 5);
                    fillBeans(7, 13);
                    loops--;

                }

                if (finish % 13 < 6) {

                    fillBeans(0, finish % 13);

                } else {

                    fillBeans(0, 5);
                    fillBeans(7, finish % 13);

                }

            }

        }

        this.setBeans(start, 0);

    }