Beispiel #1
0
        public void SetUp()
        {
            Initializer.AllInit();
            var dir = new DirectoryInfo(Path.GetDirectoryName(
                                            Assembly.GetExecutingAssembly().Location));

            while (dir.Name != "bin")
            {
                dir = dir.Parent;
            }

            dir = dir.Parent;

            var path = Path.Combine(dir.FullName, "perftsuite.epd");

            var file = "";

            try {
                file = File.ReadAllText(path);
            } catch (Exception e) {
                throw new FileNotFoundException("Invalid file path");
            }

            perftSuite = file.Split(
                new[] { Environment.NewLine },
                StringSplitOptions.None
                );

            perft    = new Perft();
            board    = new Board();
            moveList = new MoveList();
        }