public static void ReadFrom <TLoc, TState>(this GameOfLife <TLoc, TState> game, AlignedSpace <TLoc, TState> space)
 {
     foreach (var(pos, value) in space)
     {
         game[pos] = value;
     }
 }
Exemple #2
0
 public static bool ContainsValue <TPos, TVal>(this AlignedSpace <TPos, TVal> space, TVal val)
 {
     return(space.HasValue(val));
 }
Exemple #3
0
 public static IEnumerable <(TPos, TVal)> Select <TPos, TVal>(this AlignedSpace <TPos, TVal> space, SpaceFilter <TPos, TVal> filter)
 {
     foreach (var(pos, val) in space)
Exemple #4
0
 public CopySpace(AlignedSpace <TPos, TVal> reference)
 {
     _source = reference;
 }
Exemple #5
0
 public RepairDroid(string program, AlignedSpace <Pos, int> map)
 {
     Map         = map;
     _controller = Computer.From(program);
     _data       = new DataLink(_controller);
 }