30 lines
988 B
C#
30 lines
988 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Programmation_objet_TLESIO21.projet {
|
|
public class Player {
|
|
private string Name;
|
|
private string Description;
|
|
private int level;
|
|
private List<Pokemon> PC;
|
|
private List<Pokemon> Team;
|
|
|
|
#pragma warning disable CS8618 // Un champ non-nullable doit contenir une valeur non-null lors de la fermeture du constructeur. Envisagez de déclarer le champ comme nullable.
|
|
public Player(string Name, string Description, List<Pokemon> PC) {
|
|
this.Name = Name;
|
|
this.Description = Description;
|
|
this.PC = PC;
|
|
this.level = PC.Count;
|
|
this.Team = new List<Pokemon>(6);
|
|
}
|
|
|
|
public override string ToString() {
|
|
return this.Name + " est level " + this.level + ". Ses pokemon sont : " + this.PC.ToString();
|
|
}
|
|
|
|
}
|
|
}
|