public void StartBattle() { if (activationEnabled) { GameController.Instance.Warrior = null; field = Instantiate(GridBattleField, transform.position, Quaternion.identity, transform).GetComponent <HexField> (); GameController.Instance.CurrentField = field; List <Vector3> positions = RecalculateHexes(); field.GenerateCells(positions, cellsCoordinates); } field.Warriors.Clear(); //not so good foreach (BattleWarrior bw in FindObjectsOfType <BattleWarrior>()) { Cell c = field.GetClosestCell(bw.transform.position, true); c.cellWarrior = bw; NavMeshHit hit; NavMesh.SamplePosition(field.CellCoordToWorld(c), out hit, 1, NavMesh.AllAreas); bw.GetComponent <FakeController> ().GoTo(hit.position, false); field.Warriors.Add(bw); } GameController.Instance.Mode = GameController.GameMode.Battle; }
/** * Obsługuje sytuację gdy trafimy na bombę */ private void ProcessBomb(HexField hex) { if (data.sound == true) { AudioSource.PlayClipAtPoint(findBomb, transform.position); } List <HexField> listAll = boardManager.GetAllHex(); foreach (HexField currentHex in listAll) { Field currentField = (Field)currentHex.hexLogic; /** * po porażce odsłaniamy mapę, jeśli na danym polu była flaga i bomba to dajemy grafikę flag_true, jeśli na danym polu była flaga ale nie było bomby to dajemy flag_false */ if (currentField.flag.enabled) { if (currentField.type == Field.TypeNames.BOMB) { currentField.flag.sprite = flag_true; } else { currentField.flag.sprite = flag_false; } } currentField.top.enabled = false; } StateManager.SendEvent("GameFailure"); }
public void OnHexBoardUp(HexField hex) { Debug.Log("Hex Up coord:" + hex.GetCoordinates() + " position:" + hex.transform.position); hex.ShowColor(Color.green); List <HexField> list = boardManager.GetNeigbors(hex.GetCoordinates(), 2); foreach (HexField hex2 in list) { hex2.ShowColor(Color.yellow); } boardManager.AnimationGoToHex(hex, 5, false); }
public void OnCreateHexEnd(HexField hex) { if (actMineInGroupOfMinePerHexes > hexesPerMine - 1) { actMineInGroupOfMinePerHexes = 0; hexWithBomb = Random.Range(0, hexesPerMine); } if (actMineInGroupOfMinePerHexes == hexWithBomb) { Field field = (Field)hex.hexLogic; field.type = Field.TypeNames.BOMB; field.bottom.sprite = bomb; } actMineInGroupOfMinePerHexes++; }
private static void constructField(HexField.Data data, int xSize, int ySize) { GameObject obj = Instantiate(Resources.Load <GameObject>("Materials/HexBlockGO")); Transform transform = obj.transform; float delta = data.y % 2 == 1 ? xratio / 2 : 0; transform.SetPositionAndRotation(new Vector3(xratio * data.x - delta - (xSize * xratio / 2), 0, data.y * yratio - (ySize * yratio / 2)), new Quaternion()); hexMap.Add(new Vector2(data.x, data.y), transform); HexField field = obj.AddComponent <HexField>(); field.data = data; textureGameObject(obj, data.field); Project.fields.Add(field); transform.parent = GameObject.Find("Map").transform; }
/** * przekazujemy hex który jest pusty. wtedy metoda sprawdza sąsiednie, jeśli sąsiedni jest pusty i zakrtyty to rekurencyjnie wywołuje tą metodę jeszcze raz */ private void ProccessEmpty(HexField hex) { Field field = (Field)hex.hexLogic; if (field.top.enabled == true && field.flag.enabled == false) { field.top.enabled = false; List <HexField> listNeigbors = boardManager.GetNeigbors(hex.GetCoordinates()); foreach (HexField neigborHex in listNeigbors) { if (field.type == Field.TypeNames.EMPTY) { ProccessEmpty(neigborHex); } } } }
public void OnHexBoardUp(HexField hex) { if (isHexDownBlock) { return; } Debug.Log("Hex Up"); Field field = (Field)hex.hexLogic; if (isFlagMode) { if (field.top.enabled == true) { Debug.Log("FLag old:" + field.flag.enabled); if (data.sound == true) { AudioSource.PlayClipAtPoint(setFlag, transform.position); } field.flag.enabled = !field.flag.enabled; } } else { if (field.top.enabled == true && field.flag.enabled == false) { if (field.type == Field.TypeNames.EMPTY) { ProccessEmpty(hex); } field.top.enabled = false; if (field.type == Field.TypeNames.BOMB) { ProcessBomb(hex); } else { CheckFinish(); } } } // boardManager.AnimationGoToHex (hex, 5, false); }
public void OnHexBoardDown(HexField hex) { }
internal static void CreateUnits() { int Upperbound = 3; int Lowerbound = 0; Random rnd = new Random(); for (int x = 0; x < 2; x++) { _players.Add(new Player("Player" + (x + 1))); } List <HexField> usedTiles = new List <HexField>(); foreach (Player player in _players) { player.Units.Clear(); if (player == _players[0]) { Upperbound = 3; Lowerbound = 0; } else if (player == _players[1]) { Upperbound = Board.BoardHeight - 1; Lowerbound = Board.BoardHeight - 4; } else { break; } if (_config.UseInfantry) { //List<HexField> usedTiles = new List<HexField>(); for (int unitnum = 0; unitnum < _config.NumberOfInfantry; unitnum++) { bool placed = false; Unit unit = new InfantryUnit(player); while (!placed) { HexField selectedTile = null; int x = 0; int y = 0; while (selectedTile == null || selectedTile.TerrainType == TerrainTypes.Mountain || usedTiles.Contains(selectedTile)) { x = rnd.Next(Lowerbound, Upperbound); y = rnd.Next(_board.getFirstTile(x), _board.GetRowSize(x) - 1); selectedTile = _board.getTile(x, y); } unit.Center = selectedTile.Center; _overLayTiles[x][y].Unit = unit; usedTiles.Add(selectedTile); player.Units.Add(unit); } } } if (_config.UseArmoredCar) { for (int unitnum = 0; unitnum < _config.NumberOfArmoredCar; unitnum++) { bool placed = false; Unit unit = new ArmoredCarUnit(player); int x = 0; int y = 0; while (!placed) { HexField selectedTile = null; while (selectedTile == null || selectedTile.TerrainType == TerrainTypes.Mountain || usedTiles.Contains(selectedTile)) { x = rnd.Next(Lowerbound, Upperbound); y = rnd.Next(_board.getFirstTile(x), _board.GetRowSize(x) - 1); selectedTile = _board.getTile(x, y); } unit.Center = selectedTile.Center; unit.Tile = selectedTile; selectedTile.Unit = unit; selectedTile.IsOccupied = true; _overLayTiles[x][y].Unit = unit; player.Units.Add(unit); usedTiles.Add(selectedTile); UnitControl uc = new UnitControl(); uc.DataContext = unit; _unitControls.Add(uc); placed = true; } } } if (_config.UseArtillery) { for (int unitnum = 0; unitnum < _config.NumberOfArtillery; unitnum++) { throw (new NotImplementedException()); /* * bool placed = false; * Unit unit = new ArtileryUnit(); * * while (!placed) * { * HexField selectedTile = null; * while (selectedTile == null || selectedTile.TerrainType == TerrainTypes.Mountain || selectedTile.CurrentUnit != null) * { * int x = rnd.Next(player1Lowerbound, player1Upperbound); * int y = rnd.Next(_board.getFirstTile(x), _board.GetRowSize(x) - 1); * selectedTile = _board.getTile(x, y); * } * unit.Center = selectedTile.Center; * selectedTile.CurrentUnit = unit; * _units.Add(unit); * }*/ } } //player.Units = _units; _units.Clear(); } }
public void OnBuildStart(HexField patternHex, int colNumber, int rowNumber, Vector2 hexSize, bool isEven, bool symmetricHorizontal) { }
// highlight enemy node as possible attack target or own node as possible target for movement. determined by given bool. private void highlightMilitaryNode(HexField hex, bool ownNode) { if (ownNode && hex != sendOrigin.GetComponent<HexField>()) { Vector3 pos = hex.transform.position; pos.y = 0.65f; GameObject highlighter = Resources.Load("moveHighlighter", typeof(GameObject)) as GameObject; Instantiate(highlighter, pos, new Quaternion(0.0f, 0.0f, 0.0f, 0.0f)); } else if(!ownNode && hex != sendOrigin.GetComponent<HexField>()) { Vector3 pos = hex.transform.position; pos.y = 0.65f; GameObject highlighter = Resources.Load("attackHighlighter", typeof(GameObject)) as GameObject; Instantiate(highlighter, pos, new Quaternion(0.0f, 0.0f, 0.0f, 0.0f)); } }
public static Cube OddQToCube(HexField hex) { int x = hex.q, z = hex.r - ((hex.q - (hex.q & 1)) >> 1); return new Cube(x, -x - z, z); }
public FieldAndStructure(HexVM structure, HexField field) { Structure = structure ?? throw new ArgumentNullException(nameof(structure)); Field = field ?? throw new ArgumentNullException(nameof(field)); }
public void OnCreateHexEnd(HexField hex) { }
/** * Obsługuje sytuację gdy trafimy na bombę */ private void ProcessBomb(HexField hex) { if (data.sound == true) { AudioSource.PlayClipAtPoint (findBomb, transform.position); } List<HexField> listAll = boardManager.GetAllHex (); foreach (HexField currentHex in listAll) { Field currentField = (Field)currentHex.hexLogic; /** * po porażce odsłaniamy mapę, jeśli na danym polu była flaga i bomba to dajemy grafikę flag_true, jeśli na danym polu była flaga ale nie było bomby to dajemy flag_false */ if(currentField.flag.enabled){ if(currentField.type == Field.TypeNames.BOMB){ currentField.flag.sprite = flag_true; } else { currentField.flag.sprite = flag_false; } } currentField.top.enabled = false; } StateManager.SendEvent ("GameFailure"); }
/** * przekazujemy hex który jest pusty. wtedy metoda sprawdza sąsiednie, jeśli sąsiedni jest pusty i zakrtyty to rekurencyjnie wywołuje tą metodę jeszcze raz */ private void ProccessEmpty(HexField hex) { Field field = (Field)hex.hexLogic; if(field.top.enabled == true && field.flag.enabled == false){ field.top.enabled = false; List<HexField> listNeigbors = boardManager.GetNeigbors(hex.GetCoordinates()); foreach (HexField neigborHex in listNeigbors) { if(field.type == Field.TypeNames.EMPTY){ ProccessEmpty(neigborHex); } } } }
public void OnHexBoardUp(HexField hex) { if (isHexDownBlock) { return; } Debug.Log ("Hex Up"); Field field = (Field)hex.hexLogic; if (isFlagMode) { if(field.top.enabled == true){ Debug.Log ("FLag old:" + field.flag.enabled); if(data.sound == true){ AudioSource.PlayClipAtPoint(setFlag, transform.position); } field.flag.enabled = !field.flag.enabled; } } else { if(field.top.enabled == true && field.flag.enabled == false){ if(field.type == Field.TypeNames.EMPTY){ ProccessEmpty(hex); } field.top.enabled = false; if(field.type == Field.TypeNames.BOMB){ ProcessBomb(hex); } else { CheckFinish(); } } } // boardManager.AnimationGoToHex (hex, 5, false); }
public void OnCreateHexEnd(HexField hex) { if (actMineInGroupOfMinePerHexes > hexesPerMine - 1) { actMineInGroupOfMinePerHexes = 0; hexWithBomb = Random.Range(0, hexesPerMine); } if(actMineInGroupOfMinePerHexes == hexWithBomb){ Field field = (Field)hex.hexLogic; field.type = Field.TypeNames.BOMB; field.bottom.sprite = bomb; } actMineInGroupOfMinePerHexes ++; }
public static Cube EvenQToCube(HexField hex) { int x = hex.q, z = hex.r - ((hex.q + (hex.q & 1)) >> 1); return(new Cube(x, -x - z, z)); }
public static void FieldClicked(HexField clickedTile) { if (clickedTile.IsOccupied) { if (SelectedUnit == null) { if ((clickedTile.Unit as Unit).Owner as Player == _currentPlayer && !(clickedTile.Unit as Unit).HasMoved) { SelectedUnit = clickedTile.Unit as Unit; List <HexField> tmp = new List <HexField>(); _potentialMoves = Board.getPossibleMoves(clickedTile, SelectedUnit.MovementSpeed); for (var x = 0; x < _potentialMoves.Count(); x++) { if (_potentialMoves[x].IsOccupied) { tmp.Add(_potentialMoves[x]); } } foreach (HexField hex in tmp) { _potentialMoves.Remove(hex); } tmp.Clear(); tmp = Board.markPotential(clickedTile, SelectedUnit.AttackRange); foreach (HexField inRange in tmp) { if (inRange.IsOccupied) { _potentialTargets.Add(inRange); } } foreach (HexField tile in _potentialMoves) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.possible; } foreach (HexField tile in _potentialTargets) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.possible; } _overLayTiles[clickedTile.XCoord][clickedTile.YCoord].State = OverlayStates.selected; } } else { if ((clickedTile.Unit as Unit).Owner as Player != _currentPlayer) { //Perform attack int damage = (int)Math.Ceiling((decimal)(SelectedUnit.AttackStrength / (clickedTile.Unit as Unit).DefenceStrengt)); (clickedTile.Unit as Unit).Health = (clickedTile.Unit as Unit).Health - damage; if ((clickedTile.Unit as Unit).Health <= 0) { /*for (int x = 0; x < _unitControls.Count(); x++) * { * /*if ((_unitControls[x].DataContext as Unit) == (clickedTile.Unit as Unit)) * { * // MainWindow.RemoveUnit(_unitControls[x]); * //_unitControls.Remove(_unitControls[x]); * } * }*/ foreach (Player player in _players) { if (player != _currentPlayer) { player.Units.Remove((clickedTile.Unit as Unit)); _destroyedUnits.Add((clickedTile.Unit as Unit)); (clickedTile.Unit as Unit).IsAlive = false; clickedTile.Unit = null; clickedTile.IsOccupied = false; } } } _overLayTiles[clickedTile.XCoord][clickedTile.YCoord].State = OverlayStates.normal; foreach (HexField tile in _potentialMoves) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } foreach (HexField tile in _potentialTargets) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } _potentialTargets.Clear(); _potentialMoves.Clear(); SelectedUnit = null; } else if (SelectedUnit == clickedTile.Unit as Unit) { SelectedUnit = null; //clickedTile.State = TileState.Potential; _overLayTiles[clickedTile.XCoord][clickedTile.YCoord].State = OverlayStates.normal; foreach (HexField tile in _potentialMoves) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } foreach (HexField tile in _potentialTargets) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } _potentialTargets.Clear(); _potentialMoves.Clear(); } } } else { if (SelectedUnit != null) { if (_potentialMoves.Contains(clickedTile)) { //perform move HexField oldTile = SelectedUnit.Tile as HexField; oldTile.IsOccupied = false; clickedTile.IsOccupied = true; oldTile.Unit = null; clickedTile.Unit = SelectedUnit; SelectedUnit.Center = clickedTile.Center; SelectedUnit.Tile = clickedTile; _overLayTiles[oldTile.XCoord][oldTile.YCoord].State = OverlayStates.normal; SelectedUnit.HasMoved = true; SelectedUnit = null; foreach (HexField tile in _potentialMoves) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } foreach (HexField tile in _potentialTargets) { _overLayTiles[tile.XCoord][tile.YCoord].State = OverlayStates.normal; } _potentialTargets.Clear(); _potentialMoves.Clear(); } } } }
public static Cube EvenRToCube(HexField hex) { int z = hex.r, x = hex.q - ((hex.r + (hex.r & 1)) >> 1); return(new Cube(x, -x - z, z)); }
public static Cube HexToCube(HexField hex) { return new Cube(hex.q, -hex.r - hex.q, hex.r); }
public static Cube HexToCube(HexField hex) { return(new Cube(hex.q, -hex.r - hex.q, hex.r)); }
public static Cube OddRToCube(HexField hex) { int z = hex.r, x = hex.q - ((hex.r - (hex.r & 1)) >> 1); return new Cube(x, -x - z, z); }
public static void LoadHexFields(HexField[,] hexFields, ICollection <LineObject> lineObject, ICollection <Settlement> settlements, ContentManager content) { //10, 7 hexFields[4, 1] = new HexField(DataGenerator.GenerateHexTerrain(), content, 285, 120, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(7, 1), GameClass.GetSettlementByPosition(8, 1), GameClass.GetSettlementByPosition(9, 1), GameClass.GetSettlementByPosition(7, 2), GameClass.GetSettlementByPosition(8, 2), GameClass.GetSettlementByPosition(9, 2) }, new List <LineObject> { GameClass.GetRoadByBothEnds(7, 1, 8, 1), GameClass.GetRoadByBothEnds(8, 1, 9, 1), GameClass.GetRoadByBothEnds(9, 1, 9, 2), GameClass.GetRoadByBothEnds(7, 1, 7, 2), GameClass.GetRoadByBothEnds(7, 2, 8, 2), GameClass.GetRoadByBothEnds(8, 2, 9, 2) }); hexFields[5, 1] = new HexField(DataGenerator.GenerateHexTerrain(), content, 365, 120, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(9, 1), GameClass.GetSettlementByPosition(10, 1), GameClass.GetSettlementByPosition(11, 1), GameClass.GetSettlementByPosition(9, 2), GameClass.GetSettlementByPosition(10, 2), GameClass.GetSettlementByPosition(11, 2) }, new List <LineObject> { GameClass.GetRoadByBothEnds(9, 1, 10, 1), GameClass.GetRoadByBothEnds(10, 1, 11, 1), GameClass.GetRoadByBothEnds(11, 1, 11, 2), GameClass.GetRoadByBothEnds(9, 1, 9, 2), GameClass.GetRoadByBothEnds(9, 2, 10, 2), GameClass.GetRoadByBothEnds(10, 2, 11, 2) }); hexFields[6, 1] = new HexField(DataGenerator.GenerateHexTerrain(), content, 445, 120, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(11, 1), GameClass.GetSettlementByPosition(12, 1), GameClass.GetSettlementByPosition(13, 1), GameClass.GetSettlementByPosition(11, 2), GameClass.GetSettlementByPosition(12, 2), GameClass.GetSettlementByPosition(13, 2) }, new List <LineObject> { GameClass.GetRoadByBothEnds(11, 1, 12, 1), GameClass.GetRoadByBothEnds(12, 1, 13, 1), GameClass.GetRoadByBothEnds(13, 1, 13, 2), GameClass.GetRoadByBothEnds(11, 1, 11, 2), GameClass.GetRoadByBothEnds(11, 2, 12, 2), GameClass.GetRoadByBothEnds(12, 2, 13, 2) }); hexFields[3, 2] = new HexField(DataGenerator.GenerateHexTerrain(), content, 245, 190, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(6, 2), GameClass.GetSettlementByPosition(7, 2), GameClass.GetSettlementByPosition(8, 2), GameClass.GetSettlementByPosition(6, 3), GameClass.GetSettlementByPosition(7, 3), GameClass.GetSettlementByPosition(8, 3) }, new List <LineObject> { GameClass.GetRoadByBothEnds(6, 2, 7, 2), GameClass.GetRoadByBothEnds(7, 2, 8, 2), GameClass.GetRoadByBothEnds(8, 2, 8, 3), GameClass.GetRoadByBothEnds(6, 2, 6, 3), GameClass.GetRoadByBothEnds(6, 3, 7, 3), GameClass.GetRoadByBothEnds(7, 3, 8, 3) }); hexFields[4, 2] = new HexField(DataGenerator.GenerateHexTerrain(), content, 325, 190, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(8, 2), GameClass.GetSettlementByPosition(9, 2), GameClass.GetSettlementByPosition(10, 2), GameClass.GetSettlementByPosition(8, 3), GameClass.GetSettlementByPosition(9, 3), GameClass.GetSettlementByPosition(10, 3) }, new List <LineObject> { GameClass.GetRoadByBothEnds(8, 2, 9, 2), GameClass.GetRoadByBothEnds(9, 2, 10, 2), GameClass.GetRoadByBothEnds(10, 2, 10, 3), GameClass.GetRoadByBothEnds(8, 2, 8, 3), GameClass.GetRoadByBothEnds(8, 3, 9, 3), GameClass.GetRoadByBothEnds(9, 3, 10, 3) }); hexFields[5, 2] = new HexField(DataGenerator.GenerateHexTerrain(), content, 405, 190, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(10, 2), GameClass.GetSettlementByPosition(11, 2), GameClass.GetSettlementByPosition(12, 2), GameClass.GetSettlementByPosition(10, 3), GameClass.GetSettlementByPosition(11, 3), GameClass.GetSettlementByPosition(12, 3) }, new List <LineObject> { GameClass.GetRoadByBothEnds(10, 2, 11, 2), GameClass.GetRoadByBothEnds(11, 2, 12, 2), GameClass.GetRoadByBothEnds(12, 2, 12, 3), GameClass.GetRoadByBothEnds(10, 2, 10, 3), GameClass.GetRoadByBothEnds(10, 3, 11, 3), GameClass.GetRoadByBothEnds(11, 3, 12, 3) }); hexFields[6, 2] = new HexField(DataGenerator.GenerateHexTerrain(), content, 485, 190, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(12, 2), GameClass.GetSettlementByPosition(13, 2), GameClass.GetSettlementByPosition(14, 2), GameClass.GetSettlementByPosition(12, 3), GameClass.GetSettlementByPosition(13, 3), GameClass.GetSettlementByPosition(14, 3) }, new List <LineObject> { GameClass.GetRoadByBothEnds(12, 2, 13, 2), GameClass.GetRoadByBothEnds(13, 2, 14, 2), GameClass.GetRoadByBothEnds(14, 2, 14, 3), GameClass.GetRoadByBothEnds(12, 2, 12, 3), GameClass.GetRoadByBothEnds(12, 3, 13, 3), GameClass.GetRoadByBothEnds(13, 3, 14, 3) }); hexFields[3, 3] = new HexField(DataGenerator.GenerateHexTerrain(), content, 205, 260, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(5, 3), GameClass.GetSettlementByPosition(6, 3), GameClass.GetSettlementByPosition(7, 3), GameClass.GetSettlementByPosition(5, 4), GameClass.GetSettlementByPosition(6, 4), GameClass.GetSettlementByPosition(7, 4) }, new List <LineObject> { GameClass.GetRoadByBothEnds(5, 3, 6, 3), GameClass.GetRoadByBothEnds(6, 3, 7, 3), GameClass.GetRoadByBothEnds(7, 3, 7, 4), GameClass.GetRoadByBothEnds(5, 3, 5, 4), GameClass.GetRoadByBothEnds(5, 4, 6, 4), GameClass.GetRoadByBothEnds(6, 4, 7, 4) }); hexFields[4, 3] = new HexField(DataGenerator.GenerateHexTerrain(), content, 285, 260, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(7, 3), GameClass.GetSettlementByPosition(8, 3), GameClass.GetSettlementByPosition(9, 3), GameClass.GetSettlementByPosition(7, 4), GameClass.GetSettlementByPosition(8, 4), GameClass.GetSettlementByPosition(9, 4) }, new List <LineObject> { GameClass.GetRoadByBothEnds(7, 3, 8, 3), GameClass.GetRoadByBothEnds(8, 3, 9, 3), GameClass.GetRoadByBothEnds(9, 3, 9, 4), GameClass.GetRoadByBothEnds(7, 3, 7, 4), GameClass.GetRoadByBothEnds(7, 4, 8, 4), GameClass.GetRoadByBothEnds(8, 4, 9, 4) }); hexFields[5, 3] = new HexField(TerrainType.Desert, content, 365, 260, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(9, 3), GameClass.GetSettlementByPosition(10, 3), GameClass.GetSettlementByPosition(11, 3), GameClass.GetSettlementByPosition(9, 4), GameClass.GetSettlementByPosition(10, 4), GameClass.GetSettlementByPosition(11, 4) }, new List <LineObject> { GameClass.GetRoadByBothEnds(9, 3, 10, 3), GameClass.GetRoadByBothEnds(10, 3, 11, 3), GameClass.GetRoadByBothEnds(11, 3, 11, 4), GameClass.GetRoadByBothEnds(9, 3, 9, 4), GameClass.GetRoadByBothEnds(9, 4, 10, 4), GameClass.GetRoadByBothEnds(10, 4, 11, 4) }); hexFields[6, 3] = new HexField(DataGenerator.GenerateHexTerrain(), content, 445, 260, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(11, 3), GameClass.GetSettlementByPosition(12, 3), GameClass.GetSettlementByPosition(13, 3), GameClass.GetSettlementByPosition(11, 4), GameClass.GetSettlementByPosition(12, 4), GameClass.GetSettlementByPosition(13, 4) }, new List <LineObject> { GameClass.GetRoadByBothEnds(11, 3, 12, 3), GameClass.GetRoadByBothEnds(12, 3, 13, 3), GameClass.GetRoadByBothEnds(13, 3, 13, 4), GameClass.GetRoadByBothEnds(11, 3, 11, 4), GameClass.GetRoadByBothEnds(11, 4, 12, 4), GameClass.GetRoadByBothEnds(12, 4, 13, 4) }); hexFields[7, 3] = new HexField(DataGenerator.GenerateHexTerrain(), content, 525, 260, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(13, 3), GameClass.GetSettlementByPosition(14, 3), GameClass.GetSettlementByPosition(15, 3), GameClass.GetSettlementByPosition(13, 4), GameClass.GetSettlementByPosition(14, 4), GameClass.GetSettlementByPosition(15, 4) }, new List <LineObject> { GameClass.GetRoadByBothEnds(13, 3, 14, 3), GameClass.GetRoadByBothEnds(14, 3, 15, 3), GameClass.GetRoadByBothEnds(15, 3, 15, 4), GameClass.GetRoadByBothEnds(13, 3, 13, 4), GameClass.GetRoadByBothEnds(13, 4, 14, 4), GameClass.GetRoadByBothEnds(14, 4, 15, 4) }); hexFields[3, 4] = new HexField(DataGenerator.GenerateHexTerrain(), content, 245, 330, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(6, 4), GameClass.GetSettlementByPosition(7, 4), GameClass.GetSettlementByPosition(8, 4), GameClass.GetSettlementByPosition(6, 5), GameClass.GetSettlementByPosition(7, 5), GameClass.GetSettlementByPosition(8, 5) }, new List <LineObject> { GameClass.GetRoadByBothEnds(6, 4, 7, 4), GameClass.GetRoadByBothEnds(7, 4, 8, 4), GameClass.GetRoadByBothEnds(8, 4, 8, 5), GameClass.GetRoadByBothEnds(6, 4, 6, 5), GameClass.GetRoadByBothEnds(6, 5, 7, 5), GameClass.GetRoadByBothEnds(7, 5, 8, 5) }); hexFields[4, 4] = new HexField(DataGenerator.GenerateHexTerrain(), content, 325, 330, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(8, 4), GameClass.GetSettlementByPosition(9, 4), GameClass.GetSettlementByPosition(10, 4), GameClass.GetSettlementByPosition(8, 5), GameClass.GetSettlementByPosition(9, 5), GameClass.GetSettlementByPosition(10, 5) }, new List <LineObject> { GameClass.GetRoadByBothEnds(8, 4, 9, 4), GameClass.GetRoadByBothEnds(9, 4, 10, 4), GameClass.GetRoadByBothEnds(10, 4, 10, 5), GameClass.GetRoadByBothEnds(8, 4, 8, 5), GameClass.GetRoadByBothEnds(8, 5, 9, 5), GameClass.GetRoadByBothEnds(9, 5, 10, 5) }); hexFields[5, 4] = new HexField(DataGenerator.GenerateHexTerrain(), content, 405, 330, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(10, 4), GameClass.GetSettlementByPosition(11, 4), GameClass.GetSettlementByPosition(12, 4), GameClass.GetSettlementByPosition(10, 5), GameClass.GetSettlementByPosition(11, 5), GameClass.GetSettlementByPosition(12, 5) }, new List <LineObject> { GameClass.GetRoadByBothEnds(10, 4, 11, 4), GameClass.GetRoadByBothEnds(11, 4, 12, 4), GameClass.GetRoadByBothEnds(12, 4, 12, 5), GameClass.GetRoadByBothEnds(10, 4, 10, 5), GameClass.GetRoadByBothEnds(10, 5, 11, 5), GameClass.GetRoadByBothEnds(11, 5, 12, 5) }); hexFields[6, 4] = new HexField(DataGenerator.GenerateHexTerrain(), content, 485, 330, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(12, 4), GameClass.GetSettlementByPosition(13, 4), GameClass.GetSettlementByPosition(14, 4), GameClass.GetSettlementByPosition(12, 5), GameClass.GetSettlementByPosition(13, 5), GameClass.GetSettlementByPosition(14, 5) }, new List <LineObject> { GameClass.GetRoadByBothEnds(12, 4, 13, 4), GameClass.GetRoadByBothEnds(13, 4, 14, 4), GameClass.GetRoadByBothEnds(14, 4, 14, 5), GameClass.GetRoadByBothEnds(12, 4, 12, 5), GameClass.GetRoadByBothEnds(12, 5, 13, 5), GameClass.GetRoadByBothEnds(13, 5, 14, 5) }); hexFields[4, 5] = new HexField(DataGenerator.GenerateHexTerrain(), content, 285, 400, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(7, 5), GameClass.GetSettlementByPosition(8, 5), GameClass.GetSettlementByPosition(9, 5), GameClass.GetSettlementByPosition(7, 6), GameClass.GetSettlementByPosition(8, 6), GameClass.GetSettlementByPosition(9, 6) }, new List <LineObject> { GameClass.GetRoadByBothEnds(7, 5, 8, 5), GameClass.GetRoadByBothEnds(8, 5, 9, 5), GameClass.GetRoadByBothEnds(9, 5, 9, 6), GameClass.GetRoadByBothEnds(7, 5, 7, 6), GameClass.GetRoadByBothEnds(7, 6, 8, 6), GameClass.GetRoadByBothEnds(8, 6, 9, 6) }); hexFields[5, 5] = new HexField(DataGenerator.GenerateHexTerrain(), content, 365, 400, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(8, 5), GameClass.GetSettlementByPosition(9, 5), GameClass.GetSettlementByPosition(10, 5), GameClass.GetSettlementByPosition(8, 6), GameClass.GetSettlementByPosition(9, 6), GameClass.GetSettlementByPosition(10, 6) }, new List <LineObject> { GameClass.GetRoadByBothEnds(8, 5, 9, 5), GameClass.GetRoadByBothEnds(9, 5, 10, 5), GameClass.GetRoadByBothEnds(10, 5, 10, 6), GameClass.GetRoadByBothEnds(8, 5, 8, 6), GameClass.GetRoadByBothEnds(8, 6, 9, 6), GameClass.GetRoadByBothEnds(9, 6, 10, 6) }); hexFields[6, 5] = new HexField(DataGenerator.GenerateHexTerrain(), content, 445, 400, 70, 80, new List <NodeObject> { GameClass.GetSettlementByPosition(10, 5), GameClass.GetSettlementByPosition(11, 5), GameClass.GetSettlementByPosition(12, 5), GameClass.GetSettlementByPosition(10, 6), GameClass.GetSettlementByPosition(11, 6), GameClass.GetSettlementByPosition(12, 6) }, new List <LineObject> { GameClass.GetRoadByBothEnds(10, 5, 11, 5), GameClass.GetRoadByBothEnds(11, 5, 12, 5), GameClass.GetRoadByBothEnds(12, 5, 12, 6), GameClass.GetRoadByBothEnds(10, 5, 10, 6), GameClass.GetRoadByBothEnds(10, 6, 11, 6), GameClass.GetRoadByBothEnds(11, 6, 12, 6) }); }