﻿using System;
using System.Text;
using System.Collections.Generic;

namespace Poker
{
    public class Hand : IHand
    {
        public IList<ICard> Cards { get; private set; }

        public Hand(IList<ICard> cards)
        {
            this.Cards = cards;
        }

        public override string ToString()
        {
            if (Cards.Count==0)
            {
                return "Empty hand.";
            }
            StringBuilder result = new StringBuilder(Cards[0].ToString());

            for (int i = 1; i < Cards.Count; i++)
            {
                result.Append(", ");
                result.Append(Cards[i].ToString());
            }
            return result.ToString();
        }
    }
}
