From f033c76b5ae1ec4eef03a5eaf18a45c8f12f7187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi?= Date: Fri, 5 Apr 2024 17:29:36 +0200 Subject: [PATCH] Modification du constructeur + suppression de code inutile --- source/Trek-12/Models/De.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/Trek-12/Models/De.cs b/source/Trek-12/Models/De.cs index d27fb69..9c50733 100644 --- a/source/Trek-12/Models/De.cs +++ b/source/Trek-12/Models/De.cs @@ -8,23 +8,20 @@ namespace Models { public class De { - - private int nbMin; - private int nbMax; - public int nb; - public int NbMin { get; private set; } public int NbMax { get; private set; } - public int Nb - { get; private set; } + public int Nb { get; private set; } public De(int nbmin) { + if (nbmin < 0) nbmin = 0; + if (nbmin > 0) nbmin = 1; NbMin = nbmin; NbMax = nbmin + 5; } + public De() { NbMin = 0;