Пример #1
0
 public void AddPin(Pin newPin) 
 {
     for (int i = 0; i < Pins.Length; i++) 
     {
         if (Pins[i] == null)
         {
             Pins[i] = newPin;
             return;
         }
     }
 }
Пример #2
0
 public virtual Field CheckMove(Pin p, int steps)
 {
     if (steps == 0 && Pin.Player != p.Player)
         return this;
     else if (steps == 0 && Pin.Player == p.Player)
         return null;
     else
         return Next.CheckMove(p, steps - 1);
 }
Пример #3
0
 public virtual void RemovePin()
 {
     pin = null;
     //Color = "Gray";
 }
Пример #4
0
 public virtual void AddPin(Pin newPin)
 {
     pin = newPin;
     pin.Field = this;
 }