Example #1
0
 public static void CheckPosition(Figure f)
 {
     for (int i = 0; i < f.movesList.Count; i++)
     {
         try
         {
             int _i = _table[f.Coords.Item1 + f.movesList[i].deltaX, f.Coords.Item2 + f.movesList[i].deltaY];
             Moves m = f.movesList[i];
             f.movesList[i] = ChangeValid(f.movesList[i]);
         }
         catch
         {
             System.Console.WriteLine("IOF");
         }
     }
 }
Example #2
0
 static void Main(string[] args)
 {
     Figure f = new Figure(1, 1);
     ChessTable.CheckPosition(f);
     for (int i = 0; i < f.movesList.Count; i++)
     {
         Console.WriteLine(f.movesList[i].ToString());
     }
     Console.ReadLine();
 }