private void SetDisplayProperties(BoardHexagon boardTile) { if (this.displayBoneStructure) { boardTile.ShowLinks(true); boardTile.ShowTileValues(false); } else { boardTile.ShowLinks(false); boardTile.ShowTileValues(true); } }
private BoardHexagon GetBoardTile(double x, double y, TileType tileType) { BoardHexagon element = new BoardHexagon(); element.SetTileType(tileType); Board.Children.Add(element); Canvas.SetLeft(element, x); Canvas.SetTop(element, y); element.ShowLinks(false); return(element); }
public void LoadSaveData(BoardSerializable boardData) { Dictionary <HexagonTileSerializable, HexagonTile> mapping = new Dictionary <HexagonTileSerializable, HexagonTile>(); this.hexagonList.Clear(); this.Board.Children.Clear(); foreach (HexagonTileSerializable serializedTile in boardData.ActiveTileList) { HexagonTile tile = new HexagonTile() { TileType = serializedTile.TileType, }; if (tile.TileType != TileType.none) { mapping.Add(serializedTile, tile); this.hexagonList.Add(tile); BoardHexagon board = (BoardHexagon)this.GetBoardTile(serializedTile.X, serializedTile.Y); tile.Visual = board; board.SetTileType(tile.TileType); board.ShowLinks(false); } } foreach (HexagonTile tile in hexagonList) { MapUpTile(tile); } foreach (HexagonTile tile in hexagonList) { tile.Visual.SetLinkCount(); } this.SetTurn(); }