You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.2 KiB
41 lines
1.2 KiB
using System.ComponentModel;
|
|
using System.Reflection.Metadata;
|
|
|
|
namespace Model;
|
|
|
|
public class Monstre
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; }
|
|
public string Dangerosite { get; private init; }
|
|
//EN FAIT IL FAUDRAIT FAIRE UN ENUM DU TYPE DE DANGEROSITÉ, pour rajouter lors de
|
|
//l'affichage de la liste des monstres une couleur selon ça,
|
|
//genre rouge dangereux, violet hyper dangereux, et vert passif
|
|
public string Description { get; set; }
|
|
|
|
|
|
public List<string> CharacteristicsList
|
|
{
|
|
get; init;
|
|
}
|
|
|
|
|
|
public List<string> AppearanceList
|
|
{
|
|
get; init;
|
|
}
|
|
|
|
public Monstre(int id, string name, string danger, string desc, List<string> characList, List<string> appearList)
|
|
{
|
|
Id = id;
|
|
Name = name;
|
|
Dangerosite = danger;
|
|
Description = desc;
|
|
CharacteristicsList = characList;
|
|
AppearanceList = appearList;
|
|
if (string.IsNullOrWhiteSpace(Name) || string.IsNullOrWhiteSpace(Description) || string.IsNullOrWhiteSpace(danger))
|
|
{
|
|
throw new ArgumentException("Un monstre doit avoir un nom, une description et une dangerosité!");
|
|
}
|
|
}
|
|
} |