reading fucking cells
This commit is contained in:
@@ -2,21 +2,30 @@ from lightmatchingengine.lightmatchingengine import LightMatchingEngine,Side,Tra
|
||||
from econ.exchange import Exchange
|
||||
from econ.simulation import Simulation
|
||||
from econ.business.Price_Believe_Business import Price_Believe_Business
|
||||
from econ.commoditys import commoditys
|
||||
from econ.cells import db, cell
|
||||
|
||||
db.load_world("db/world.json")
|
||||
|
||||
commoditys.search_yaml_files()
|
||||
|
||||
cell_realm=[]
|
||||
|
||||
for c in db.world["cells"]["cells"]:
|
||||
if c["province"]==187:
|
||||
cell_realm.append(c)
|
||||
|
||||
cells=cell.create_cells_from_world_cells(cell_realm)
|
||||
|
||||
|
||||
w="world"
|
||||
cx=Exchange()
|
||||
cxs=[cx]
|
||||
# Init World
|
||||
cx.add_to_account(w,"balance",15000)
|
||||
cx.add_to_account(w,"Raw_Wood",1000)
|
||||
cx.add_to_account(w,"Raw_Stone",1000)
|
||||
cx.submit_order(w,"Raw_Stone",1000,0,Side.SELL)
|
||||
cx.submit_order(w,"Raw_Wood",1000,0,Side.SELL)
|
||||
|
||||
# Create Demand
|
||||
cx.submit_order(w,"Wood",10,10,Side.BUY)
|
||||
cx.submit_order(w,"Wood",0,1000,Side.BUY)
|
||||
cx.submit_order(2,"Gem",1,10,Side.SELL)
|
||||
|
||||
sim=Simulation()
|
||||
bus=Price_Believe_Business(1,{
|
||||
|
||||
Reference in New Issue
Block a user