-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNegaMaxSolverWithConfigurationFilesInExeFolder.cs
38 lines (34 loc) · 1.25 KB
/
NegaMaxSolverWithConfigurationFilesInExeFolder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.IO;
namespace AndrewTweddle.Tron.Core
{
public class NegaMaxSolverWithConfigurationFilesInExeFolder: NegaMaxSolverWithFileBasedWeightings
{
public string Name
{
get;
private set;
}
public NegaMaxSolverWithConfigurationFilesInExeFolder(string name)
{
Name = name;
LoadWeightings();
}
protected override string GetXmlFileNameForWeightingsInSameCompartment()
{
string exeFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string xmlWeightingsFilePath = Path.Combine(exeFolder, String.Format("{0}_SameCompartment.xml", Name));
return xmlWeightingsFilePath;
}
protected override string GetXmlFileNameForWeightingsInSeparateCompartments()
{
string exeFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string xmlWeightingsFilePath = Path.Combine(exeFolder, String.Format("{0}_SeparateCompartments.xml", Name));
return xmlWeightingsFilePath;
}
}
}