Skip to content

Reference

tilttek/math-trade

Every public type of the package, with its role.

TypeRole
TradeListThe whole trade: participants, offers and wishes, checked against each other and against the limits
ParticipantSomeone who takes part, and the offers they make
OfferA copy of a game put in the trade, its game, and its wishes, most wished first
Contract\WishOne line of a wish list: the offers it names
WantA wish for one offer
WantGroupA wish for any one of several offers, at one priority
LimitsHow large a list and its JSON document may be
TradeSolverFinds the most trades, at the best priorities, with ties broken by the seed
TradeResultThe trades found, the seed, and the offers kept
TradeCycleA loop of trades
TradeOne offer changing hands: offer, giver, receiver
SwapWhat a traded offer means for its owner: what they send to whom, and what they receive from whom
TradeListJsonWrites a trade list as JSON, and reads it back
Exception\MathTradeException and its three exceptionsExceptions

The Internal namespace is the library's own: its classes may change in any version.