Example #1
0
 public Cell(bool alive, Coordonnate coordonnate, BoardCoordonnates neighborhoodCoords, Rule rules)
 {
     this.coordonnate        = coordonnate;
     this.neighborhoodCoords = neighborhoodCoords;
     this.alive = alive;
     this.rules = rules;
 }
Example #2
0
 public BasicStayAlive(BoardCoordonnates neighborhoodCells)
 {
     this.neighborhoodCells = new MatchingCellsFactory(neighborhoodCells);
 }
Example #3
0
 public Distinct(BoardCoordonnates coords)
 {
     this.coords = coords;
     this.coordonnateComparer = new CoordonnateComparer();
 }
Example #4
0
 public Cell(bool alive, int coordonnateX, int coordonnateY, BoardCoordonnates neighborhoodCoords)
     : this(alive, new Coordonnate(coordonnateX, coordonnateY), neighborhoodCoords, new BasicRules(alive, neighborhoodCoords))
 {
 }
Example #5
0
 public Cell(bool alive, Coordonnate coordonnate, BoardCoordonnates neighborhoodCoords)
     : this(alive, coordonnate, neighborhoodCoords, new BasicRules(alive, neighborhoodCoords))
 {
 }
Example #6
0
 public ReferenceCoordonnate(BoardCoordonnates board)
 {
     this.board = board;
 }
 public RelativeCoordonnates(BoardCoordonnates figures)
 {
     this.figures   = figures;
     this.baseCoord = new ReferenceCoordonnate(figures);
 }
Example #8
0
 public MatchingCells(BoardCoordonnates neighborhood, IEnumerable <Cell> cellsToMatch)
     : this(neighborhood, new DefaultCells(cellsToMatch))
 {
 }
 public MatchingCellsFactory(BoardCoordonnates neighborhoodCells)
 {
     this.neighborhoodCells = neighborhoodCells;
 }
Example #10
0
 public MatchingCells(BoardCoordonnates neighborhood, BoardCells cellsToMatch)
 {
     this.neighborhood = neighborhood;
     this.cellsToMatch = new CacheCells(cellsToMatch);
 }
 public NoMatchingCoordonnates(BoardCoordonnates coordonnates, IEnumerable <Cell> cells)
     : this(coordonnates, new DefaultCells(cells))
 {
 }
 public NoMatchingCoordonnates(BoardCoordonnates coordonnates, BoardCells cells)
 {
     this.coordonnates = coordonnates;
     this.cells        = new CacheCells(cells);
 }
 public CoordonnatesToCells(bool alive, BoardCoordonnates neighborhoodCells)
 {
     this.neighborhoodCells = neighborhoodCells;
     this.cellFactory       = new SimpleCell(alive);
 }
Example #14
0
 public BasicRules(bool isCellAlive, BoardCoordonnates neighborhoodCells)
     : this(isCellAlive, new BasicStayAlive(neighborhoodCells), new BasicBecomeAlive(neighborhoodCells))
 {
 }