// Path: src/main/java/com/fluxchess/pulse/MoveList.java
// static class MoveEntry {
// 
// 	int move = NOMOVE;
// 	int value = NOVALUE;
// }
// 
// Path: src/main/java/com/fluxchess/pulse/model/Color.java
// public static int opposite(int color) {
// 	switch (color) {
// 		case WHITE:
// 			return BLACK;
// 		case BLACK:
// 			return WHITE;
// 		default:
// 			throw new IllegalArgumentException();
// 	}
// }


import static com.fluxchess.pulse.MoveList.MoveEntry;
import static com.fluxchess.pulse.model.Color.opposite;
import static java.lang.System.currentTimeMillis;
import static java.util.concurrent.TimeUnit.*;

		System.out.format("Testing %s at depth %d%n", Notation.fromPosition(position), depth);

		long startTime = currentTimeMillis();
		long result = miniMax(depth, position, 0);
		long endTime = currentTimeMillis();

		long duration = endTime - startTime;

		System.out.format(
				"Nodes: %d%nDuration: %02d:%02d:%02d.%03d%n",
				result,
				MILLISECONDS.toHours(duration),
				MILLISECONDS.toMinutes(duration) - HOURS.toMinutes(MILLISECONDS.toHours(duration)),
				MILLISECONDS.toSeconds(duration) - MINUTES.toSeconds(MILLISECONDS.toMinutes(duration)),
				duration - SECONDS.toMillis(MILLISECONDS.toSeconds(duration))
		);

		System.out.format("n/ms: %d%n", result / duration);
	}

	private long miniMax(int depth, Position position, int ply) {
		if (depth == 0) {
			return 1;
		}

		int totalNodes = 0;

		boolean isCheck = position.isCheck();
		MoveGenerator moveGenerator = moveGenerators[ply];
// Path: src/main/java/com/fluxchess/pulse/MoveList.java
// static class MoveEntry {
// 
// 	int move = NOMOVE;
// 	int value = NOVALUE;
// }
// 
// Path: src/main/java/com/fluxchess/pulse/model/Color.java
// public static int opposite(int color) {
// 	switch (color) {
// 		case WHITE:
// 			return BLACK;
// 		case BLACK:
// 			return WHITE;
// 		default:
// 			throw new IllegalArgumentException();
// 	}
// }


// Path: src/main/java/com/fluxchess/pulse/Perft.java
import static com.fluxchess.pulse.MoveList.MoveEntry;
import static com.fluxchess.pulse.model.Color.opposite;
import static java.lang.System.currentTimeMillis;
import static java.util.concurrent.TimeUnit.*;


		System.out.format("Testing %s at depth %d%n", Notation.fromPosition(position), depth);

		long startTime = currentTimeMillis();
		long result = miniMax(depth, position, 0);
		long endTime = currentTimeMillis();

		long duration = endTime - startTime;

		System.out.format(
				"Nodes: %d%nDuration: %02d:%02d:%02d.%03d%n",
				result,
				MILLISECONDS.toHours(duration),
				MILLISECONDS.toMinutes(duration) - HOURS.toMinutes(MILLISECONDS.toHours(duration)),
				MILLISECONDS.toSeconds(duration) - MINUTES.toSeconds(MILLISECONDS.toMinutes(duration)),
				duration - SECONDS.toMillis(MILLISECONDS.toSeconds(duration))
		);

		System.out.format("n/ms: %d%n", result / duration);
	}

	private long miniMax(int depth, Position position, int ply) {
		if (depth == 0) {
			return 1;
		}

		int totalNodes = 0;

		boolean isCheck = position.isCheck();
		MoveGenerator moveGenerator = moveGenerators[ply];
		MoveList<MoveEntry> moves = moveGenerator.getMoves(position, depth, isCheck);