public Cell(int row, int column) { position.x = row; position.y = column; Neighbours = new CellNeighbours(); linkNeigbours = new CellNeighbours(); }
public CellNeighbours Index2Neighbor(CellNeighbourIndicies indicies) { CellNeighbours neighbours = new CellNeighbours(); if (indicies.East != null) { neighbours.East = _cells[indicies.East.y * Width + indicies.East.x]; } if (indicies.West != null) { neighbours.West = _cells[indicies.West.y * Width + indicies.West.x]; } if (indicies.North != null) { neighbours.North = _cells[indicies.North.y * Width + indicies.North.x]; } if (indicies.South != null) { neighbours.South = _cells[indicies.South.y * Width + indicies.South.x]; } return(neighbours); }
public void SetCellLinks(CellNeighbours links) { this.linkNeigbours = links; }
public void SetCellNeigbours(CellNeighbours neighbours) { this.Neighbours = neighbours; }