public static List <BonusPosition> CreatePosition(Wheel wheel) { var rowPositions = wheel.Reels.Select(reel => reel.FindIndex(p => p == BullRushConfiguration.WHEEL) + 1).ToList(); var bonusPosition = new BonusPosition() { RowPositions = rowPositions }; return(new List <BonusPosition>() { bonusPosition }); }
private void ReadBonusPositionXElement(XElement element) { var bpelement = element.Element("bonusposition"); if (bpelement == null) return; foreach (XElement elem in bpelement.Elements()) { BonusPosition bp = new BonusPosition(); bp.Line = elem.AttributeValue("line").ToInt(); bp.Win = elem.AttributeValue("win").ToDecimal(); bp.Multiplier = elem.AttributeValue("mul").ToInt(); bp.RowPositions = elem.Value.Split(',').Select(int.Parse).ToList(); } }