public static void main(String[] args) throws Exception
	{
        // game parameters
        
        String output = null;
        int d = 0;
        if (args.length > 0)
             d = Integer.parseInt(args[0]);
        if (args.length > 1)
            group0 = args[1];
        if (args.length > 2)
            group1 = args[2];
        if (args.length >3)
        	output = args[3];
        
        // create game
       
		writer = new PrintWriter(output, "UTF-8");
        Offset game = new Offset();
        game.init();
        p0=randomPair(d);
        //p0=new Pair(3,4);
        p1=randomPair(d);
        //p1=new Pair(1,6);
        while (p0.p==p1.p || p0.q == p1.p) {
        	p1=randomPair(d);
        }
        System.out.printf("Pair 1 is (%d, %d)", p0.p, p0.q);
        System.out.printf("Pair 2 is (%d, %d)", p1.p, p1.q);
        player0 = loadPlayer(group0, p0, 0);
        player1 = loadPlayer(group1, p1, 1);
        // init game
        
        // play game
        //if (gui) {
            game.playgui();
       // }
       // else {
         //   game.play();
       // }
       
    }