Example #1
0
 public void PromotionCheck(Turn turn)
 {
     if (!turn.Promote)
     {
         turn.ToInt(out int wordStart, out int numStart, out int wordEnd, out int numEnd);
         if (numEnd == 0)
         {
             if (Board.Cells[numStart][wordStart] == BlackPawn)
             {
                 turn.ApplyPromotion();
             }
         }
         if (numEnd == 7)
         {
             if (Board.Cells[numStart][wordStart] == WhitePawn)
             {
                 turn.ApplyPromotion();
             }
         }
     }
 }