Example #1
0
 internal void BuildCampus(CampusType type, Color color)
 {
     Campus = new Campus(type, color);
     if (type == CampusType.Traditional)
     {
         foreach (Vertex adj in Adjacent.Vertices)
         {
             adj.NumberOfNeighbourCampuses += 1;
         }
     }
 }
Example #2
0
 public void BuildCampus(Vertex vertex, CampusType type, Color color)
 {
     vertex.BuildCampus(type, color);
 }
Example #3
0
 public Campus(CampusType type, Color color)
 {
     Type = type;
     Color = color;
 }
Example #4
0
 protected void BuildCampus(int x, int y, VertexOrientation vo, CampusType type)
 {
     var whereAt = new VertexPosition(new Position(x, y), vo);
     BuildCampus(whereAt, type);
 }
Example #5
0
 public bool IsLegalToBuildCampus(VertexPosition whereAt, CampusType type)
 {
     Vertex vertex = Board[whereAt];
     if (vertex == null)
     {
         return false;
     }
     if (type == CampusType.Super)
     {
         return (vertex.Campus != null &&
                 vertex.Campus.Color == CurrentUniversityColor &&
                 vertex.Campus.Type == CampusType.Traditional);
     }
     // tranditional campus
     bool result = vertex.IsFreeToBuildCampus();
     if (CurrentPhase == GamePhase.Play)
     {
         result = result && vertex.Adjacent.Edges.Any(e => e.Color == CurrentUniversityColor);
     }
     return result;
 }
Example #6
0
 public void BuildCampus(VertexPosition whereAt, CampusType type)
 {
     var vertex = Board[whereAt];
     Board.BuildCampus(vertex, type, CurrentUniversity.Color);
     CurrentUniversity.AddCampus(vertex, type);
 }
Example #7
0
 public void AddCampus(IVertex vertex, CampusType type)
 {
     AddProductionChances(vertex);
     if (type == CampusType.Traditional)
     {
         Campuses.Add(vertex);
         _game.Hashing.HashVertex(Color, vertex.Position, type);
         CheckLongestLinkForOtherUniversities(vertex);
         AddTradingSite(vertex);
     }
     else //if (type == CampusType.Super)
     {
         SuperCampuses.Add(vertex);
         Campuses.Remove(vertex);
         _game.Hashing.HashVertex(Color, vertex.Position, CampusType.Super);
         _game.Hashing.HashVertex(Color, vertex.Position, CampusType.Traditional);
     }
 }
Example #8
0
 public void HashVertex(Color color, VertexPosition vPos, CampusType type)
 {
     Vertex vertex = _game.Board[vPos];
     Hash ^= _coloredHashing[color].CampusHash[type][vertex];
 }
 public BuildCampusMove(VertexPosition where, CampusType type)
 {
     WhereAt = where;
     CampusType = type;
 }
Example #10
0
 public void HashVertex(Color color, VertexPosition vPos, CampusType type)
 {
 }