using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WinGreed { public class HandleThrow { public string Who { get; set; } public int Score { get; set; } //private List _dices = new List(); public List Dices { get; set; } = new List(); int roll; public HandleThrow() { for (int i = 1; i < 7; i++) { Dices.Add(new Dice(i)); } roll = 0; } public List Throw() { var rolled = new List(); roll += 1; foreach (Dice dice in Dices) { if (!dice.Chosen) { dice.Roll(); rolled.Add(dice); } } return rolled; } } }