public IEnumerable<Cell> GetNeighbors(Cell cell)
        {
            var x = cell.X;
            var y = cell.Y;

            if (cell.X > 1)
                yield return Cell.Take(x - 1, y);

            if (cell.Y < Hight)
                yield return Cell.Take(x + 1, y);
        }
Beispiel #2
0
 public static PushNeighborsMessage CreateMessage(Cell cell)
 {
     return new PushNeighborsMessage(cell);
 }
Beispiel #3
0
 public PushNeighborsMessage(Cell cell)
 {
    this.Cell = cell;
 }
Beispiel #4
0
 public SetMessage(Cell cell, bool value)
 {
     Value = value;
     this.Cell = cell;
 }
Beispiel #5
0
 public static PushCellMessage CreateMessage(Cell cell)
 {
     return new PushCellMessage(cell);
 }
Beispiel #6
0
 public PushCellMessage(Cell cell)
 {
     this.Cell = cell;
 }
 public bool? GetCellValue(Cell cell)
 {
     return storege[cell.X, cell.Y];
 }
 public void SetCellValue(Cell cell, bool value)
 {
     storege[cell.X, cell.Y] = value;
 }