void CRobot :: Pass() { int raw_price = Data->market.min_raw_price; int prod_price = Data->market.max_prod_price; int prod_n = Data->you.raw; int sell_n = Data->you.prod; int buy_n = Data->you.fabrics; // --- Fair analyZe --- // --- Raw buy int tmp = 0; for (int i = 0; iplayers_count; i++) tmp += Data->players[i].raw; double scale = (tmp + Data->you.fabrics) / Data->market.raw; scale < 1 ? : raw_price = (int) (raw_price * scale); // --- Prod sell tmp = 0; for (int i = 0; iplayers_count; i++) tmp += Data->players[i].prod; scale = (tmp + Data->you.prod) / Data->market.prod; scale < 1 ? : prod_price = (int) (prod_price / scale); Buy(buy_n,raw_price); Sell(sell_n,prod_price); Prod(prod_n); Turn(); };