Esempio n. 1
0
 static PlaceBetResponse Process(SessionInfo session, PlaceBetResponse res, decimal payIn, long guessLow, long guessHigh, int clientSeed, Currencies currency)
 {
     res.Currency = currency;
     if (res.Success)
     {
         session.PauseUpdates();
         try
         {
             ++session[currency].BetCount;
             session[currency].BetPayIn  += payIn;
             session[currency].BetPayOut += res.PayOut;
             session[currency].Balance    = res.StartingBalance + res.PayOut + payIn;
             if (res.Secret >= guessLow && res.Secret <= guessHigh)
             {
                 ++session[currency].BetWinCount;
             }
         }
         finally
         {
             session.UnpauseUpdates();
         }
     }
     return(res);
 }