/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hw6;

/**
 *
 * @author kvaradar
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Queue<Integer> que = new MyQueue<Integer>();
        /* random Josephus example to test the class you wrote */
        for (int i =0; i < 17; i++)
            que.enqueue(i);
        while(que.size() > 1){
            for (int j = 0; j < 6; j++)
                que.enqueue(que.dequeue());
            System.out.println("  " + que.dequeue() + "is out");
        }
        System.out.println("Winner is: " + que.dequeue());


    }

}
