| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move AccountDTO/MarketDTO/MarketStateDTO/PurchaseReceiptDTO/TradeRowDTO
out of the catch-all api package into model.market (and LedgerDTO into
model.ledger), matching the existing model.event convention so DTOs
live next to the domain they describe rather than in the interface
package. Relocate LedgerMapper from mapper.v2 to infrastructure.adapter
to match the module's established package layout, and update all call
sites and imports accordingly.
Also register the ui-desktop module in the build tooling: add it to
MODULES, add openjfx to the shipped runtime libs, and generalize
package.sh so each executable module (ui-console, ui-desktop) gets its
own Main-Class/Class-Path manifest and run script instead of
special-casing ui-console. Fold long Class-Path manifest lines at 72
bytes per the JAR spec, since adding ui-desktop's dependencies pushed
the line past the limit.
|
| |
|
|
|
| |
build.sh now passes -processorpath/-s so MapStruct's generated impl
compiles alongside hand-written sources.
|
| |
|
|
|
| |
Groups them with the other event-domain enums instead of the general
api package, and updates all call sites accordingly.
|
| |
|
|
|
|
|
|
|
| |
state I/O
Adds a full pre-load validation pass for GM XML seeds (ids, names,
options, commission, LMSR liquidity), replaces IO.print with
System.out, and surfaces detailed error messages across load/save
commands instead of generic failures.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- Event ledger now grows on purchase and shrinks on payout, mirroring
the exact amounts moved on the buyer's ledger (it previously had a
Ledger object that nothing ever wrote to).
- Settlement and event-detail views now show the winning market's
display name instead of its raw key; event details are viewable for
settled events too (the picker previously excluded anything not
ACTIVE).
- LMSR events seed their ledger with a SUBSIDY entry for the market
maker's worst-case loss (b * ln(outcomes)), reusing the existing
cost() function rather than recomputing the formula.
|
| |
|
|
|
|
|
|
|
| |
BuyMenuCommand to PlaceOrderMenuCommand
Introduces XMLValidatorV1 and deserializer/adapter classes for events, ledgers,
markets, users, and trading mechanisms. Replaces the monolithic build.bat/run.sh
scripts with per-module tools (_util.sh, build.sh, package.sh, test.sh) that
compile in dependency order.
|
| |
|
|
|
|
|
|
|
| |
Move XML loading infrastructure and models under service/catalog, and
split order execution into a real pipeline: RiskEngine checks the order,
MatchingEngine matches it, FulfillmentContext books the resulting trades,
and SettlementContext resolves winning markets. GuessMarketContext.buyShares
becomes placeOrder(price, quantity), and TradingMechanism.buy now returns
matched trades directly instead of a single TradeExecution.
|
| |
|
|
|
|
|
| |
Moves Event/Ledger DTOs out of the flat api package into
api/model/{event,ledger}, and moves LocalCatalogContext and order
matching logic into dedicated service/catalog and service/matching
packages, replacing TradingOperation/TradingOperationImpl.
|
| |
|
|
|
|
| |
Split GuessMarketContext into a separate CatalogContext for read-only
event listing, wrap fallible operations in Result<T> instead of throwing,
and wire load/save of events and users through a JSON Wrapper.
|
| |
|
|
|
|
|
|
|
|
|
| |
new menu commands
Fill in the previously stubbed cost/pricing math for both trading
mechanisms, and give OrderBookTradingMechanism an actual matching engine
with resting bid/ask books. Fold EventRepository/UserRepository access
into a single MarketContext used by LocalGuessMarketContext, and move the
repository package under infrastructure. Add Buy/EventDetails/LoadState/
SaveState/SettleEvent console commands and wire them into App/Menu.
|
| |
|
|
|
|
|
|
|
| |
TradingMechanism's q/quantity params move from long/long[] to int/int[]
to match the rest of the domain (Trade.quantity, Option counts, etc.
are already int).
Add InputProcessor.readYesNo and readSelect for upcoming menu commands
that need a confirm prompt or a pick-from-list prompt.
|
| |
|
|
|
|
|
|
|
|
|
| |
InputProvider/OutputProvider each had one implementation and no test
exercised the seam, so fold Console{Input,Output}Provider straight into
InputProcessor and update Menu/MenuCommand call sites accordingly.
Account and Event both use AtomicInteger for a ledger/trade id counter
that's only ever touched next to a plain, non-thread-safe ArrayList add
in the same method - the atomic bought no real thread-safety. Swapped
both to plain int with ++.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
commands
- Add generic Repository<T> interface; EventRepository/UserRepository extend it
- Implement InMemoryEventRepository/InMemoryUserRepository backed by ArrayList
- Rename XMLLoader to XMLLoaderV1, add LoadValidator and mapper/v2 package
- Add OrderBookTradingMechanism
- Add User(String, int) convenience constructor
- Add ListEventsMenuCommand and ExitMenuCommand, isExit() on MenuCommand
- Menu now sizes selection range by max command index and exits on isExit()
- LoadFileMenuCommand reports validation issues on failed loads
- Untrack test-data/ and config.properties from .gitignore
|
| |
|
|
|
| |
Correct Mapper's generic parameter order to <TModel, TDomain> and stub
addEvent/addUser on the Event/User repositories.
|
| |
|
|
|
|
|
|
| |
Implement LocalGuessMarketContext.buyShares/loadEvents via a new
TradingOperation and Loader, backed by in-memory repositories. Replace
the ConsoleInputProviderFactory/ConsoleOutputProviderFactory pattern
with picocontainer-injected providers, and drive the menu from a list
of MenuCommand implementations instead of a hardcoded printout.
|
| |
|
|
|
|
|
| |
Drops AccountType (accounts no longer need to self-identify),
gives Account credit()/debit() that append LedgerEntry rows, adds
Event.recordTrade()/tradeVolumeOf()/getCommission(), and implements
LocalGuessMarketContext.listEvents() via the repository.
|
| |
|
|
|
|
| |
Adds LmsrTradingMechanism, exposes Event/Account getters plus
Event.toEventSummary() for DTO conversion, and implements
EventMapperV1.toDomain() to build Event from the legacy XML model.
|
| |
|
|
|
|
|
| |
and tests
Removes the placeholder Mapper interface in favor of concrete mapper/provider
implementations, fixes Menu.stop() to no-op instead of throwing.
|
| |
|
|
|
| |
Rename repositories package to repository, add MarketAction domain type,
and round Account.initialBalance through BigDecimalOptions.toMoney.
|
| |
|
|
|
|
|
| |
module
Introduces Account/Event/Trade/User/Option/LedgerEntry domain types plus
EventRepository/UserRepository and TradingMechanism abstractions.
|
|
|
GuessMarketContext gained a richer surface (loadEvents/listEvents/
buyShares/closeEvent/account/save-restoreState) backed by new
EventDetailDTO, MarketStateDTO, OptionStateDTO and PurchaseReceiptDTO.
The old engine-module provider implemented the previous shape and is
removed; market.guess.service.LocalGuessMarketContext replaces it as a
stub, each method throwing UnsupportedOperationException pending a
real implementation.
|