public static void main(String[] args) {
        // you get the white pieces, we play the black pieces
        oe = new OurEvaluator();
        ye = new YourEvaluator();
        //ye = new OurEvaluator();
        int depth = 5;
        Position p = new Position();
        p.setStartingPosition();
        p.print();

        System.out.println("Eval: " + oe.eval(p));

        long ms = System.currentTimeMillis();

        while (true) {
            ce = oe;
            //System.out.println("Minmax: "+minmax(p,3,(p.whiteToMove?1:0)));
            ce = ye;
            Vector<Position> P = p.getNextPositions();

            double evaluation = (new OurEvaluator()).eval(p);

            if (p.winner == +1) {
                System.out.println("White won.");
                break;
            }

            if (p.winner == -1) {
                System.out.println("Black won.");
                break;
            }

            if (P.size() == 0) {
                System.out.println("No more available moves");
                break;
            }

            Position bestPosition = new Position();
            if (p.whiteToMove) {
                ce = ye;
                double max = -1. / 0.;
                for (int i = 0; i < P.size(); ++i) {
                    double val = minmax(P.elementAt(i), depth, 1);
                    if (max < val) {
                        bestPosition = P.elementAt(i);
                        max = val;
                    }
                }
            } else {
                ce = oe;
                double min = 1. / 0.;
                for (int i = 0; i < P.size(); ++i) {
                    double val = minmax(P.elementAt(i), depth, 0);
                    if (min > val) {
                        bestPosition = P.elementAt(i);
                        min = val;
                    }
                }
            }

            assert p.whiteToMove != bestPosition.whiteToMove;
            p = bestPosition;
            p.print();

            long curtime = System.currentTimeMillis();
            System.out.println("Move took " + ((curtime - ms) / 1000.0) + " seconds");
            ms = curtime;
        }

        /*
        for(int i = 0; i < 60; ++i) {
        System.out.println("----------------");
        Vector<Position> P = p.getNextPositions();
        p = P.elementAt((int)(Math.random()*P.size()));
        p.print();
        System.out.println("Eval: "+eval(p));
        }
         */
    }