示例#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;
 }