Package nl.zoidberg.calculon.util

Source Code of nl.zoidberg.calculon.util.PerformanceTests

package nl.zoidberg.calculon.util;

import nl.zoidberg.calculon.engine.BitBoard;
import nl.zoidberg.calculon.engine.MoveGenerator;
import nl.zoidberg.calculon.engine.PawnMoveGenerator;

public class PerformanceTests {

    public static void main(String[] args) throws Exception {
        BitBoard board = new BitBoard().initialise();

        // Min 1350
        long pre = System.nanoTime();
        for(int x = 0; x < 1000000; x++) {
            MoveGenerator moveGenerator = new MoveGenerator(board);
            moveGenerator.setGenerators(new PawnMoveGenerator());
            moveGenerator.getAllRemainingMoves();
        }
        pre = System.nanoTime() - pre;
        System.out.println("time(ms): " + pre/1000000);
    }
}
TOP

Related Classes of nl.zoidberg.calculon.util.PerformanceTests

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.