dobroslav-atanasov

Untitled

Feb 18th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. namespace PokemonTrainer
  2. {
  3.     using System.Collections.Generic;
  4.  
  5.     public class Trainer
  6.     {
  7.         private string name;
  8.         private int badges;
  9.         private List<Pokemon> pokemons;
  10.  
  11.         public Trainer(string name)
  12.         {
  13.             this.Name = name;
  14.             this.Badges = 0;
  15.             this.Pokemons = new List<Pokemon>();
  16.         }
  17.  
  18.         public List<Pokemon> Pokemons
  19.         {
  20.             get { return this.pokemons; }
  21.             set { this.pokemons = value; }
  22.         }
  23.  
  24.         public int Badges
  25.         {
  26.             get { return this.badges; }
  27.             set { this.badges = value; }
  28.         }
  29.  
  30.         public string Name
  31.         {
  32.             get { return this.name; }
  33.             set { this.name = value; }
  34.         }
  35.     }
  36. }
Add Comment
Please, Sign In to add comment