Ejemplo n.º 1
0
 public Stock(Version fv, WsgFileStream fs, System.Object obj) : base()
 {
     try
     {
         StockIndexes = new StockIndexes();
         PriceHistory = new DoubleHistory();
         Load(fv, fs, obj);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 public Stock(Version serverversion, ICommunicateable communicator, bool full, System.Object obj) : base()
 {
     try
     {
         StockIndexes = new StockIndexes();
         PriceHistory = new DoubleHistory();
         ClientCommunication(serverversion, communicator, full, obj);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 3
0
 public Player(int id, Version serverversion, ICommunicateable communicator, bool full, System.Object obj) : base()
 {
     try
     {
         Id           = id;
         Deposit      = new Deposit(this, (Stocks)obj);
         ValueHistory = new DoubleHistory();
         ClientCommunication(serverversion, communicator, full, obj);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
 public Player(int id, Version fv, WsgFileStream fs, System.Object obj) : base()
 {
     try
     {
         Id           = id;
         Deposit      = new Deposit(this, (Stocks)obj);
         ValueHistory = new DoubleHistory();
         Load(fv, fs, obj);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public Stock(string id, string name, StockIndex stockindex, System.Random random) : base()
 {
     try
     {
         Id = id;
         Name = name;
         StockIndexes = new StockIndexes();
         PriceHistory = new DoubleHistory();
         AddStockIndex(stockindex);
         Reset(random);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 6
0
 public Player(int id, string company, string name, Stocks stocks, bool iscomputer, bool isyou) : base()
 {
     try
     {
         Id           = id;
         Company      = company;
         Name         = name;
         IsComputer   = iscomputer;
         IsYou        = isyou && !IsComputer;
         Deposit      = new Deposit(this, stocks);
         ValueHistory = new DoubleHistory();
         Reset(null);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 7
0
        private MinAndMax <double> GetMinAndMax(int fun, MinAndMax <double> mam, DoubleHistory history)
        {
            try
            {
                switch (fun)
                {
                case 1:
                    mam = GetMinAndMax(mam, history.Min, history.Max);
                    break;

                case 2:
                    mam = GetMinAndMax(mam, 0, history.Count);
                    break;
                }
                return(mam);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }