SHARE
TWEET

Untitled

a guest Oct 20th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace _9._Pokemon_Trainer_EXE
  7. {
  8.     public class Trainer
  9.     {
  10.         public Trainer(string name, Pokemon collectionOfPokemons)
  11.         {
  12.             var counter = 1;
  13.             this.Name = name;
  14.             this.NumberOfBadges = 0;
  15.             if (counter != 1)
  16.             {
  17.                 this.CollectionOfPokemons.Add(collectionOfPokemons);
  18.             }
  19.             else
  20.             {
  21.                 this.CollectionOfPokemons = new List<Pokemon>();
  22.                 CollectionOfPokemons.Add(collectionOfPokemons);
  23.             }
  24.             this.Appierence++;
  25.         }
  26.         public string Name { get; set; }
  27.         public int Appierence { get; private set; }
  28.         public int NumberOfBadges { get; set; }
  29.         public List<Pokemon> CollectionOfPokemons { get; set; }
  30.         public void RemovePokemons()
  31.         {
  32.             CollectionOfPokemons = CollectionOfPokemons.Where(x => x.Health > 0).ToList();
  33.         }
  34.     }
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top