예제 #1
0
 /// <summary>
 /// Sort turns by PASS(Ascending) then by TURN VALUE(Descending)
 /// </summary>
 /// <param name="TurnA"></param>
 /// <param name="TurnB"></param>
 /// <returns></returns>
 int TurnSortMethodA(clsTurn TurnA, clsTurn TurnB)
 {
     //Sort by PASS first, Ascending
     if (TurnA.Pass < TurnB.Pass)
     {
         return(-1);
     }
     else if (TurnA.Pass > TurnB.Pass)
     {
         return(1);
     }
     else
     {
         //If both turns are on the same PASS, then sort by VALUE, descending
         if (TurnA.Value < TurnB.Value)
         {
             return(1);
         }
         else if (TurnA.Value > TurnB.Value)
         {
             return(-1);
         }
         else
         {
             return(0);
         }
     }
 }
예제 #2
0
        //Spend 5 Points
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            clsTurn selected = (clsTurn)clstInitiative.SelectedItem;

            if (selected != null)
            {
                selected.Character.Spend(5);
                UpdateInitiative();
            }
        }
예제 #3
0
 /// <summary>
 /// Sort turns by TURN VALUE alone
 /// </summary>
 /// <param name="TurnA"></param>
 /// <param name="TurnB"></param>
 /// <returns></returns>
 int TurnSortMethodB(clsTurn TurnA, clsTurn TurnB)
 {
     if (TurnA.Value < TurnB.Value)
     {
         return(1);
     }
     else if (TurnA.Value > TurnB.Value)
     {
         return(-1);
     }
     else
     {
         return(0);
     }
 }