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.
Trek12_API/Sources/Model/Case.cs

43 lines
875 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class Case
{
public int Id { get; set; }
public int Valeur
{
get => valeur;
set
{
//pas évolutif car case dangereuse c'est 6 MAX
if (value > 12 || value < 0)
{
throw new ArgumentException("a Case must have a value lower or equal to 12");
}
valeur = value;
}
}
private int valeur;
public Case()
{
Valeur = 0;
}
public Case(int valeur)
{
Valeur = valeur;
}
public void AddValue(int valeur)
{
this.valeur = valeur;
}
}
}