public static Feld getRandom(Random rnd) { Feld feld = new Feld(); for (int i = 0; i < feld.Length; i++) feld[i] = rnd.Next(0, 10); return feld; }
public static Feld operator +(Feld a, Feld b) { Feld erg = new Feld(); for (int i = 0; i < a.Length; i++) erg[i] = a[i] + b[i]; return erg; }
public static void print(Feld feld) { for(int i = 0; i < feld.Length; i++) { Console.WriteLine("{0}: {1}", i+1, feld[i]); } Console.WriteLine(); }