public Board(int oreTypes) { OreColumns = new List <OreColumn>(InitialColumnCount); for (var i = 0; i < InitialColumnCount; i++) { OreColumns.Add(OreColumn.GenerateRandomColumn(oreTypes)); } }
public static OreColumn GenerateRandomColumn(int oreTypes) { var oreColumn = new OreColumn(); for (var i = 0; i < ColumnSize; i++) { oreColumn.Push(new Ore((OreType)_random.Next(0, oreTypes))); } return(oreColumn); }
public void AddColumn(int oreTypeCount) { OreColumns.Insert(0, OreColumn.GenerateRandomColumn(oreTypeCount)); }