public class PerftSuite extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PERFT_DEPTH_OP_CODE |
static String |
PERFT_NODE_COUNT_OP_CODE |
Constructor and Description |
---|
PerftSuite(String perftEntriesFilePath)
Parses the perft records in the specified file and holds them in a list.
|
Modifier and Type | Method and Description |
---|---|
List<EPDRecord> |
getRecords() |
static boolean |
perft(ControllerEngine engine,
EPDRecord record)
Runs a perft test on the position specified in the record to the depth noted using the provided engine and returns whether the engine
counted the same number of positions as stated in the record.
|
public static final String PERFT_DEPTH_OP_CODE
public static final String PERFT_NODE_COUNT_OP_CODE
public PerftSuite(String perftEntriesFilePath) throws IOException
perftEntriesFilePath
- The path to the file containing the perft test records.IOException
- If the file does not exist or cannot be read.public static boolean perft(ControllerEngine engine, EPDRecord record) throws Exception
engine
- The engine to test.record
- The perft record specifying the position, the depth, and the correct number of nodes.Exception
- If the engine cannot be initialized.Copyright © 2020. All rights reserved.