public void AddCombatCard(int PlayerId, CombatCard combatCard)
        {
            // Segun lo que entendi por enunciado. ¿Para que pasamos el player si Board se instancia desde el jugador mismo? Supongo que hay dos tableros???
            // Si no fuera asi, instanciariamos al Player dentro del tablero y no viceversa

            // Also para que creamos este metodo si tenemos metedos para que tipo de CombatCard

            switch (combatCard.Type)
            {
            case "Melee":
                this.meleeCards[PlayerId].Add(combatCard);
                break;

            case "Range":
                this.rangeCards[PlayerId].Add(combatCard);
                break;

            case "LongRange":
                this.longRangeCards[PlayerId].Add(combatCard);
                break;

            default:
                // Card type non existent
                return;
            }
        }
Exemplo n.º 2
0
 public void AddCombatCard(int Playerid, CombatCard combatCard)
 {
     if (combatCard.Type == "melee")
     {
         this.AddMeleeCard(Playerid, combatCard);
     }
     if (combatCard.Type == "range")
     {
         this.AddRangeCard(Playerid, combatCard);
     }
     if (combatCard.Type == "LongRange")
     {
         this.AddLongRangeCard(Playerid, combatCard);
     }
 }
        //Metodos

        public void AddCombatCard(int playerId, CombatCard combatCard)
        {
            if (combatCard.Type == "Melee")
            {
                AddMeleeCard(playerId, combatCard);
            }
            if (combatCard.Type == "Range")
            {
                AddRangeCard(playerId, combatCard);
            }
            if (combatCard.Type == "LongRange")
            {
                AddLongRangeCard(playerId, combatCard);
            }
        }
        public void AddCombatCard(int PlayerId, CombatCard combatCard)
        {
            if (combatCard.type == "melee")
            {
                MeleeCards[PlayerId].Add(combatCard);
            }

            else if (combatCard.type == "range")
            {
                RangeCards[PlayerId].Add(combatCard);
            }

            else if (combatCard.type == "longrange")
            {
                longRangeCards[PlayerId].Add(combatCard);
            }
        }
Exemplo n.º 5
0
        //NUEVOS METODOS
        public void AddCombatCard(int playerId, CombatCard combatCard)
        {
            string tipo = combatCard.Type;

            if (tipo == "melee")
            {
                meleeCards[playerId].Add(combatCard);
            }
            else if (tipo == "range")
            {
                rangeCards[playerId].Add(combatCard);
            }
            else if (tipo == "longRange")
            {
                LongRangeCards[playerId].Add(combatCard);
            }
            return;
        }
        // METODOS ESCRITOS POR MI (LO QUE SE PIDE EN EL LAB)

        public void AddCombatCard(int playerId, CombatCard combatCard)
        {
            // Primero, obtenemos el tipo de la carta
            string type = combatCard.Type;

            // Dependiendo del tipo, la agregamos a la lista de cartas del jugador correspondiente
            if (type == "melee")
            {
                this.meleeCards[playerId].Add(combatCard);
            }
            else if (type == "rangeCards")
            {
                this.rangeCards[playerId].Add(combatCard);
            }
            else
            {
                this.longRangeCards[playerId].Add(combatCard);
            }
            return;
        }
Exemplo n.º 7
0
        //Metodos


        public void AddCombatCard(CombatCard combatCard, int playerId)
        {
            string typeOfCard = combatCard.Type;

            if (typeOfCard == "melee")
            {
                this.meleeCards[playerId].Add(combatCard);
            }
            else if (typeOfCard == "range")
            {
                this.rangeCards[playerId].Add(combatCard);
            }
            else if (typeOfCard == "long range")
            {
                this.longRangeCards[playerId].Add(combatCard);
            }
            else
            {
                throw new NotImplementedException();
            }
        }
        //Metodos
        public void AddCombatCard(int PlayerId, CombatCard combatCard)
        {
            switch (combatCard.Type)
            {
            case "melee":
                AddMeleeCard(PlayerId, combatCard);
                break;

            case "range":
                AddRangeCard(PlayerId, combatCard);
                break;

            case "longRange":
                AddLongRangeCard(PlayerId, combatCard);
                break;

            default:
                Console.WriteLine(" Invalid Combat Card Type, must be 'melee', 'range' or 'longRange' ");
                break;
            }
        }
Exemplo n.º 9
0
        //Metodos
        public void AddCombatCard(int PlayerId, CombatCard combatCard)
        {
            string caseswitch = combatCard.Type;

            switch (caseswitch)
            {
            case "melee":
                meleeCards[PlayerId - 1].Add(combatCard);
                break;

            case "range":
                rangeCards[PlayerId - 1].Add(combatCard);
                break;

            case "longrange":
                longRangeCards[PlayerId - 1].Add(combatCard);
                break;

            default:
                break;
            }
        }
Exemplo n.º 10
0
 public void AddLongRangeCard(int PlayerId, CombatCard combatCard)
 {
     this.longRangeCards[PlayerId].Add(combatCard);
 }
Exemplo n.º 11
0
 //Metodos
 public void AddMeleeCard(int PlayerId, CombatCard combatCard)
 {
     this.meleeCards[PlayerId].Add(combatCard);
 }
 public void AddRangeCard(int PlayerId, CombatCard combatCard)
 {
     rangeCards[PlayerId].Add(combatCard);
 }
 public void AddLongRangeCard(int playerId, CombatCard combatCard)
 {
     LongRangeCards[playerId - 1].Add(combatCard);
 }
 public void AddMeleeCard(int playerId, CombatCard combatCard)
 {
     MeleeCards[playerId - 1].Add(combatCard);
 }
Exemplo n.º 15
0
 public void AddCombatCard(int playerId, CombatCard combatCard)
 {
 }
Exemplo n.º 16
0
 internal static void add(CombatCard combatCard)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 17
0
 public void AddCombatCard(CombatCard combatCard)
 {
     throw new NotImplementedException();
 }
 public void AddLongRangeCard(int PlayerId, CombatCard combatCard)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 19
0
 public void AddCombatCard(int playerId, CombatCard combatCard)
 {
     throw new NotImplementedException();
 }