public void ResetFlags() { m_bHaveBonus = false; m_bHasSlotFeature = false; m_SlotFeatureResultList.Clear(); m_FreeSpinProperties = null; m_iBaseWinAmount = 0; }
public SpinResult() { m_WinLines = new List <WinLine>(); m_TriggerLines = new List <SlotReel.TriggerSymbol>(); m_ScatterWins = new List <SlotReel.ScatterSymbol>(); m_SlotFeatureResultList = new List <SlotFeatureResult>(); m_SlotFeatureResult = null; m_WayPayWins = new List <WayPayWin>(); m_BonusId = new List <int>(); m_SlotFeatureId = new List <int>(); m_BonusId.Add(0); m_BonusId.Add(0); m_BonusId.Add(0); m_SlotFeatureId.Add(0); m_SlotFeatureId.Add(0); m_SlotFeatureId.Add(0); m_FreeSpinProperties = null; }
public SlotReel(int iSlotNumber, XmlNode node, bool bWayPay) { m_Random = new Random(); m_SpinResult = new SpinResult(); m_TriggerSymbols = new List <TriggerSymbol>(); m_ScatterSymbols = new List <ScatterSymbol>(); m_FreeSpinProperties = null; m_FreeSpinStopsTickets = null; m_bForceSpin = false; m_bWayPay = bWayPay; if (bWayPay) { m_WayPay = new WayPay(); } #if _SIMULATOR m_SymbolStats = new List <SymbolStatistics>(); m_WinLineFoundCount = new List <int>(); m_iTotalWinAmount = 0; m_iPlaySpinCount = 0; #endif }
public bool LoadXML(XmlNode node) { XmlNodeList childNodes = node.ChildNodes; m_SlotColumns = new List <int[]>(); m_WildSymbolsID = new List <int>(); m_WinningLines = new List <int[]>(); int iNumOfColumns = int.Parse(node.Attributes["col"].Value); int iNumOfRows = int.Parse(node.Attributes["row"].Value); m_iSlotId = int.Parse(node.Attributes["id"].Value); m_iExtraWilds = new List <int>(); int iNumOfPositions = iNumOfColumns * iNumOfRows; for (int i = 0; i < iNumOfPositions; i++) { m_iExtraWilds.Add(0); } if (bool.Parse(node.Attributes["freespin"].Value) == true) { m_FreeSpinProperties = new FreeSpinProperties(); m_FreeSpinProperties.FreeSpinsTotal = node.Attributes["freespincount"] != null?int.Parse(node.Attributes["freespincount"].Value) : 0; m_FreeSpinStopsTickets = new List <string>(); } for (int count = 0; count < iNumOfColumns; count++) { m_SlotColumns.Add(new int[iNumOfRows]); m_iReelStops = new List <int>();//new int[iNumOfColumns]; for (int i = 0; i < iNumOfColumns; i++) { m_iReelStops.Add(0); } } for (int i = 0; i < childNodes.Count; i++) { switch (childNodes[i].Name) { case "REELS": { m_ReelStripList = new List <int[]>(); if (!CreateReelStips(childNodes[i])) { return(false); } } break; case "WINNING_LINES": { if (!m_bWayPay) { m_WinningLines = new List <int[]>(); if (!CreateWinningLines(childNodes[i])) { return(false); } m_Winlines = new Winlines(); m_Winlines.CreateWinLines(m_WinningLines); m_Winlines.BuildTree(); } } break; case "PAYTABLE": { m_Paytable = new Paytable(childNodes[i]); } break; case "WILDS": { int[] wildList = StringUtility.StringToIntArray(childNodes[i].Attributes["id"].Value, ' '); for (int wildcount = 0; wildcount < wildList.Length; wildcount++) { m_WildSymbolsID.Add(wildList[wildcount]); } } break; case "TRIGGER": { TriggerSymbol triggerSym = new TriggerSymbol(); if (childNodes[i].Attributes["triggertype"] != null) { if (childNodes[i].Attributes["triggertype"].Value == "slotfeature") { triggerSym.triggerType = TriggerSymbol.TYPE.SLOT_FEATURE; } else { triggerSym.triggerType = TriggerSymbol.TYPE.BONUS; } } else { triggerSym.triggerType = TriggerSymbol.TYPE.BONUS; } triggerSym.iSymbolId = int.Parse(childNodes[i].Attributes["symbolid"].Value); triggerSym.iNumOfSymbols = int.Parse(childNodes[i].Attributes["numofsymbol"].Value); if (childNodes[i].Attributes["bonusgame"] != null) { triggerSym.iBonusId = int.Parse(childNodes[i].Attributes["bonusgame"].Value); } if (childNodes[i].Attributes["slotfeature"] != null) { triggerSym.iBonusId = int.Parse(childNodes[i].Attributes["slotfeature"].Value); } m_TriggerSymbols.Add(triggerSym); } break; case "SCATTER": { ScatterSymbol scatterSym = new ScatterSymbol(); scatterSym.iSymbolId = int.Parse(childNodes[i].Attributes["symbolid"].Value); scatterSym.iNumOfSymbols = int.Parse(childNodes[i].Attributes["numofsymbol"].Value); scatterSym.iCredits = int.Parse(childNodes[i].Attributes["extracredits"].Value); scatterSym.iMultiplier = int.Parse(childNodes[i].Attributes["multiplier"].Value); m_ScatterSymbols.Add(scatterSym); } break; } } #if _SIMULATOR List <Symbol> AllSymbols = m_Paytable.GetAllSymbols(); for (int i = 0; i < AllSymbols.Count; i++) { SymbolStatistics symStat = new SymbolStatistics(); symStat.numofSymCountList = new Dictionary <int, int>(); symStat.iSymbolid = AllSymbols[i].SymbolId; symStat.symbolCount = 0; symStat.iTotalWinAmount = 0; Dictionary <int, int> symbolPaytable = AllSymbols[i].getPayoutList(); foreach (KeyValuePair <int, int> entry in symbolPaytable) { symStat.numofSymCountList.Add(entry.Key, 0); } m_SymbolStats.Add(symStat); } for (int i = 0; i < m_WinningLines.Count; i++) { m_WinLineFoundCount.Add(0); } for (int i = 0; i < m_ScatterSymbols.Count; i++) { if (StatsContainSymbol(m_ScatterSymbols[i].iSymbolId)) { SymbolStatistics stat = getSymbolStat(m_ScatterSymbols[i].iSymbolId); stat.numofSymCountList.Add(m_ScatterSymbols[i].iNumOfSymbols, 0); } else { SymbolStatistics symStat = new SymbolStatistics(); symStat.numofSymCountList = new Dictionary <int, int>(); symStat.iSymbolid = m_ScatterSymbols[i].iSymbolId; symStat.symbolCount = 0; symStat.iTotalWinAmount = 0; symStat.numofSymCountList.Add(m_ScatterSymbols[i].iNumOfSymbols, 0); m_SymbolStats.Add(symStat); } } #endif return(true); }