예제 #1
0
 //Constructor  FromString( s,  Players,  LosePlayer)
 public TMatch(string s, TPlayer[] Players, TPlayer LosePlayer)
 {
     string[] a;
     a = UHelpers.UHelpers.Explode(s, Units.Class.SEP_MATCH);
     if (a[0] == Units.Class.ID_NO_PLAYER_STR)
     {
         PlayerA = null;
     }
     else if (a[0] == Units.Class.ID_LOSE_PLAYER_STR)
     {
         PlayerA = LosePlayer;
     }
     else
     {
         PlayerA = Players[Convert.ToInt32(a[0])];
     }
     if (a[1] == Units.Class.ID_NO_PLAYER_STR)
     {
         PlayerB = null;
     }
     else if (a[1] == Units.Class.ID_LOSE_PLAYER_STR)
     {
         PlayerB = LosePlayer;
     }
     else
     {
         PlayerB = Players[Convert.ToInt32(a[1])];
     }
     PlayerAPoints = Convert.ToInt32(a[2]);
     PlayerBPoints = Convert.ToInt32(a[3]);
     FightTime     = Convert.ToInt32(a[4]);
 }
예제 #2
0
 //Constructor  Create()
 public TMatch()
 {
     PlayerA       = null;
     PlayerB       = null;
     PlayerAPoints = 0;
     PlayerBPoints = 0;
     FightTime     = 0;
 }