コード例 #1
0
 void _OnSnakeLengthReduction(SnakeLengthReductionEvent e)
 {
     for (int i = 0; i < e.reduction; ++i)
     {
         MoveTail();
     }
 }
コード例 #2
0
 void _OnSnakeLengthReduction(SnakeLengthReductionEvent e)
 {
     // add inactive apples to the board
     while (num_inactive > 0)
     {
         if (BoardData.RandomApple())
         {
             num_inactive--;
         }
         else
         {
             break;
         }
     }
 }