Exemplo n.º 1
0
 public override void Use()
 {
     if (_type == EnumsForCards.cardMove.directMove) //direct movement
     {
         Owner.Move(_move);
     }
     else if (_type == EnumsForCards.cardMove.closestUtility) //move to closest Utility. tile12, tile28
     {
         AdvClosestUtility();
     }
     else if (_type == EnumsForCards.cardMove.closestTrainStation) //move to closest train station. tile35, tile25, tile15, tile05
     {
         AdvClosestStation();
     }
     else if (_type == EnumsForCards.cardMove.moveBackThreeTiles)
     {
         int currPos = GetPlayerPosIndex();
         Owner.Move(GameManager.Tiles[currPos - 3]);
     }
     else // go to jail
     {
         Jail.GoToJail();
     }
     base.Use();
     GameManager.EndOfRollOptions();
 }