using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class Playlist
    {
        public string Nom { get; set; }

        public string Description { get; set; }

        public IEnumerable<Morceau> Morceaux { get; set; }

        public Playlist(string nom, string description)
        {
            Nom = nom;
            Description = description;
            Morceaux = new List<Morceau>();
        }

        public void addMorceau(Morceau morceau)
        {
            Morceaux.Prepend(morceau);
        }

        public void removeMorceau(Morceau morceau)
        {
            Morceaux.ToList().Remove(morceau);
        }

    }
}
