Example #1
0
        public Stock CreateStock(string animalName, LuaStockProxy lua)
        {
            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
            string path = Path.Combine(Environment.CurrentDirectory, DirectoryConstants.StockDirectory);

            return(new Stock(StockNames.ProperStockNames[animalName], lua.GetLimbAttributes(path + animalName + ".lua")));
        }
Example #2
0
        private Dictionary <string, Stock> InitStockPool(List <string> stockNames)
        {
            StockFactory stockFactory            = new StockFactory();
            Dictionary <string, Stock> stockPool = new Dictionary <string, Stock>();

            foreach (var stockName in stockNames)
            {
                LuaStockProxy lua = new LuaStockProxy();
                stockPool.Add(StockNames.ProperStockNames[stockName], stockFactory.CreateStock(stockName, lua));
            }
            return(stockPool);
        }