示例#1
0
 /// <summary>
 /// Initialise Region
 /// </summary>
 /// <param name="id">id</param>
 /// <param name="superRegion">SuperRegion</param>
 public Region(int id, SuperRegion superRegion)
 {
     this.id = id;
     this.superRegion = superRegion;
     this.neighbours = new BaseRegions();
     player = PLAYER.UNKNOWN;
     armies = 2;
 }
示例#2
0
文件: Map.cs 项目: Bolukan/TweakBot
 /// <summary>
 /// Add SuperRegion (setup_map super_regions)
 /// </summary>
 /// <param name="superRegion">SuperRegion</param>
 public void AddSuperRegion(SuperRegion superRegion)
 {
     superRegions.Add(superRegion);
 }
示例#3
0
文件: Go.cs 项目: Bolukan/TweakBot
 // SuperRegions with least regions not mine
 public static Region BestTarget(SuperRegion SR)
 {
     return SR.RWhere(PLAYER.NOT_ME).SelectMany(Target => Target.Neighbours).Where(N => N.Player == PLAYER.ME).OrderByDescending(R =>
            R.Neighbours.Count(N => N.Player == PLAYER.OTHER) * 2 +
            R.Neighbours.Count(N => N.Player == PLAYER.NEUTRAL)).First();
 }