Changeset 281 for trunk/UGame.pas


Ignore:
Timestamp:
Feb 21, 2019, 10:45:41 PM (6 years ago)
Author:
chronos
Message:
  • Added: New map type hexagonal horizontal.
  • Added: Limit allowed map type according selected game system.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r277 r281  
    3030  TGrowAmount = (gaByOne, gaBySquareRoot);
    3131  TGrowCells = (gcNone, gcPlayerCities, gcPlayerAll);
    32   TMapType = (mtNone, mtHexagon, mtSquare, mtTriangle, mtRandom, mtIsometric);
    3332  TWinObjective = (woNone, woDefeatAllOponents, woDefeatAllOponentsCities,
    3433    woSpecialCaptureCell, woStayAliveForDefinedTurns, woCaptureEntireMap);
     
    268267  case AValue of
    269268    mtNone: Map := TMap.Create;
    270     mtHexagon: Map := THexMap.Create;
     269    mtHexagonVertical: Map := THexMapVertical.Create;
    271270    mtSquare: Map := TSquareMap.Create;
    272271    mtTriangle: Map := TTriangleMap.Create;
    273272    mtRandom: Map := TVoronoiMap.Create;
    274273    mtIsometric: Map := TIsometricMap.Create;
     274    mtHexagonHorizontal: Map := THexMapHorizontal.Create;
    275275    else raise Exception.Create(SUnsupportedMapType);
    276276  end;
     
    537537  with Config do begin
    538538    StoredRandSeed := GetValue(DOMString(Path + '/RandSeed'), 0);
    539     MapType := TMapType(GetValue(DOMString(Path + '/GridType'), Integer(mtHexagon)));
     539    MapType := TMapType(GetValue(DOMString(Path + '/GridType'), Integer(mtHexagonVertical)));
    540540    Map.Size := TPoint.Create(GetValue(DOMString(Path + '/MapSizeX'), 10),
    541541      GetValue(DOMString(Path + '/MapSizeY'), 10));
Note: See TracChangeset for help on using the changeset viewer.