How oldmanalpha/monopoly-deal works
Project type and purpose
• This is a Java‑based, client–server application implementing a digital version of the Monopoly Deal card game.
• It consists of three Maven modules:
• common: shared data models, network API, packet definitions
• client: GUI, input handling, audio, game‑state client logic, network client
• server: game engine, rules engine, AI, event bus, command console, network server, mod/plugin loader
• The goal is to let players play Monopoly Deal over the network, support single‑player with bots, and allow modding.
File structure
• Top‑level pom.xml with three submodules (client, common, server).
• common/ contains oldmana.md.common packages:
• net/api – connection and packet buffer interfaces
• net/packet – all client⇄server packet classes
• common data types, JSON utilities
• client/ holds oldmana.md.client:
• client core (MDClient, EventQueue, Scheduler)
• gui (frames, components, screens, layout, utilities)
• net (ServerConnection, NetClientHandler)
• state machine for client actions
• resources (fonts, sounds)
• server/ holds oldmana.md.server:
• net (IncomingConnectionsThread, NetServerHandler, Client wrappers)
• core (MDServer, Scheduler, PlayerRegistry, config)
• event (EventManager, handlers, game event classes)
• card/domain (Card, CardAction, CardCollection, Deck, Registry, templates)
• rules (GameRules, policies, win conditions)
• AI (AIManager, BasicAI, PlanDesire)
• command (chat commands, console command parser)
• mod loader (ModLoader, ModClassLoader)
• history/undo
• state machine for server-side game states
README for additional insights
• Confirms client/server usage, Java 8 requirement, default port 27599, ability to play single‑player or host multiplayer, modding guide link.
Detailed but not over‑abstracted
• As many subcomponents as makes sense (e.g., separate Event Bus from Rules Engine).
• Every major piece: GUI screens, state machine, packet parsing, domain logic, AI, mods.
• Interactions and dependencies are visible.