public Bonus(int iBonusID, SlotEngine engineObject, ePlayType type) { // m_BonusResult = new BonusResult(); m_BonusId = iBonusID; m_Engine = engineObject; m_bDone = true; m_bStarted = false; m_ePlayType = type; m_sMarketType = "general"; }
public void SetForceSpin(string sForceSpin, bool bSimulator = false) { if (sForceSpin != "" && !bSimulator) { XmlDocument doc = new XmlDocument(); doc.LoadXml(sForceSpin); XmlNode playNode = doc.SelectSingleNode("PLAY"); string sReelStops = playNode.Attributes["RS"].Value; int[] forcestops = StringUtility.StringToIntArray(sReelStops, ' '); SlotEngine.Log("Game Engine: SlotReel::SetForceSpin() - " + "reel stops: " + sReelStops); if (forcestops.Length != 0) { for (int i = 0; i < m_iReelStops.Count; i++) { m_iReelStops[i] = forcestops[i]; setReelStopIndex(m_iReelStops[i], i); } m_bForceSpin = true; } } else if (sForceSpin != "" && bSimulator) { int[] forcestops = StringUtility.StringToIntArray(sForceSpin, ' '); SlotEngine.Log("Game Engine: SlotReel::SetForceSpin() - " + "reel stops: " + sForceSpin); if (forcestops.Length != 0) { for (int i = 0; i < m_iReelStops.Count; i++) { m_iReelStops[i] = forcestops[i]; setReelStopIndex(m_iReelStops[i], i); } m_bForceSpin = true; } } }
public SpinResult PlayGame(int betAmount = 1, bool bFreeSpin = false) { if (m_bRecovery) { if (m_RecoveryReelStops.Length != 0) { for (int i = 0; i < m_iReelStops.Count; i++) { m_iReelStops[i] = m_RecoveryReelStops[i]; setReelStopIndex(m_iReelStops[i], i); } } } else if (!m_bForceSpin) { SlotEngine.Log("Game Engine: SlotReel::PlayGame() - no force spin detected"); Spin(); } for (int i = 0; i < m_iExtraWilds.Count; i++) { m_iExtraWilds[i] = 0; } //int getAmount = m_Winlines.Evaluate(m_SlotColumns, 0, m_Paytable, m_WildSymbolsID, betAmount); int getAmount = Evaluate(betAmount, bFreeSpin);//m_Winlines.Evaluate(m_SlotColumns, 0, m_Paytable, m_WildSymbolsID, betAmount); EvaluateScatterSymbols(); List <ScatterSymbol> scatterWins = m_SpinResult.getScatterWins(); if (!m_bWayPay) { List <WinLine> winLines = m_Winlines.getWinLines(); for (int i = 0; i < scatterWins.Count; i++) { if (scatterWins[i].iCredits != 0) { getAmount += scatterWins[i].iCredits * betAmount; WinLine wLine = new WinLine(-1, scatterWins[i].iSymbolId, scatterWins[i].iNumOfSymbols, scatterWins[i].iCredits * betAmount, null); winLines.Add(wLine); } } m_SpinResult.setResult(getAmount, /*m_Winlines.getWinLines()*/ winLines, m_iReelStops); } EvaluateTriggerLines(); if (bFreeSpin) { m_FreeSpinProperties.CurrentFreeSpin++; m_FreeSpinProperties.WinAmount += m_SpinResult.getWinAmount(); m_SpinResult.FreeSpinProp = m_FreeSpinProperties; if (m_FreeSpinProperties.CurrentFreeSpin == m_FreeSpinProperties.FreeSpinsTotal) { m_SpinResult.FreePlay = false; } else { m_SpinResult.FreePlay = true; } } m_bRecovery = false; m_bForceSpin = false; #if _SIMULATOR // CollectStatistics(); //m_iPlaySpinCount += 1; #endif return(m_SpinResult); }
public SpinResult PlayTicket(int[] reelStops, int betAmount = 1, bool bFreeSpin = false) { if (!bFreeSpin) { try { for (int i = 0; i < m_iReelStops.Count; i++) { m_iReelStops[i] = reelStops[i]; setReelStopIndex(m_iReelStops[i], i); } } catch (Exception e) { SlotEngine.ThrowError("GAME ENGINE ERROR!"); SlotEngine.Log("GAME ENGINE reel stops. SlotReel::PlayTicket() - " + e.Message); } int getAmount = Evaluate(betAmount, bFreeSpin); EvaluateScatterSymbols(); List <ScatterSymbol> scatterWins = m_SpinResult.getScatterWins(); if (!m_bWayPay) { List <WinLine> winLines = m_Winlines.getWinLines(); for (int i = 0; i < scatterWins.Count; i++) { if (scatterWins[i].iCredits != 0) { getAmount += scatterWins[i].iCredits * betAmount; WinLine wLine = new WinLine(-1, scatterWins[i].iSymbolId, scatterWins[i].iNumOfSymbols, scatterWins[i].iCredits * betAmount, null); winLines.Add(wLine); } } m_SpinResult.setResult(getAmount, /*m_Winlines.getWinLines()*/ winLines, m_iReelStops); } EvaluateTriggerLines(); } if (bFreeSpin) { int[] FSreelStops = StringUtility.StringToIntArray(m_FreeSpinStopsTickets[m_FreeSpinProperties.CurrentFreeSpin], ' '); try { for (int i = 0; i < m_iReelStops.Count; i++) { m_iReelStops[i] = FSreelStops[i]; setReelStopIndex(m_iReelStops[i], i); } } catch (Exception e) { SlotEngine.ThrowError("GAME ENGINE ERROR!"); SlotEngine.Log("GAME ENGINE FS reel stops. SlotReel::PlayTicket() - " + e.Message); } int getAmount = Evaluate(betAmount, bFreeSpin); EvaluateTriggerLines(); m_FreeSpinProperties.CurrentFreeSpin++; m_FreeSpinProperties.WinAmount += m_SpinResult.getWinAmount(); m_SpinResult.FreeSpinProp = m_FreeSpinProperties; if (m_FreeSpinProperties.CurrentFreeSpin == m_FreeSpinProperties.FreeSpinsTotal) { m_SpinResult.FreePlay = false; } else { m_SpinResult.FreePlay = true; } } return(m_SpinResult); }