using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Intrinsics.X86;
using System.Text;
using System.Threading.Tasks;

namespace CanYouBuildIt.Model
{
    public class Build
    {
        public int id { get; private set; }
        public float prix { get; private set; }
        public List<Composant> listComp { get; private set; }


        public Build(int idBuild, float prixBuild, Composant boitier, Composant processeur, Composant ventirad, Composant cartemere, Composant memoirevive, Composant cartegraphique, Composant alimentation, Composant ventilateur, Composant ssd = null, Composant hdd = null)
        {
            id = idBuild;
            prix = prixBuild;
            listComp.Add(boitier);
            listComp.Add(processeur);
            listComp.Add(ventirad);
            listComp.Add(cartemere);
            listComp.Add(memoirevive);
            listComp.Add(cartegraphique);
            listComp.Add(alimentation);
            listComp.Add(ventilateur);
            if(ssd != null)
            {
                listComp.Add(ssd);
            }
            if(hdd != null)
            {
                listComp.Add(hdd);
            }

        }
    
    }
}
