예제 #1
0
파일: Region.cs 프로젝트: Bolukan/TweakBot
 /// <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();
 }