Koningsburcht is a first-year school project for an object-oriented programming course. It is a C++ desktop implementation inspired by the board game of the same name, built with Qt Widgets.
The project models the game using classes for players, resources, buildings, helpers, and character cards. A Qt graphics scene provides the game interface, while a JSON file stores the initial game state.
This is a two-player, turn-based game. Players choose character cards, gather and trade resources, construct buildings, and assign helpers. Character actions are resolved in order, and the game awards points based on the players' progress and helper placements.
The implemented character actions include:
- Messenger: collects coins from the bank.
- Trader: gathers resources reserved through the courier.
- Bricklayer: uses resources to construct buildings and manage helpers.
- Master Builder: returns cards to the player and awards points for building activity.
The interface and prompts are currently in Dutch.
- C++17
- Qt Widgets (Qt 5 or Qt 6)
- qmake project configuration
- JSON for initial game state
The project's UML class diagram is available in docs/KoningsBurchtUML.pdf.
Open konproj.pro in Qt Creator, select a desktop Qt kit, then build and run. With Qt's command-line tools configured, the typical qmake workflow is:
qmake konproj.pro
make
./konprojOn macOS, the built application may instead be located in the generated .app bundle, depending on the selected Qt kit and build configuration.
The initial game state is stored in data/koningsBurchtFile.json and bundled into the application by data/gameData.qrc. The game loads it as a Qt resource, so launching from a different working directory does not affect the data path.
src/model/: board, buildings, players, resources, helpers, and game rulessrc/cards/: card classes and character actionssrc/view/: Qt graphics views and main windowsrc/main.cpp: application entry pointdata/: starting game state and Qt resource filedocs/KoningsBurchtUML.pdf: UML class diagramkonproj.pro: qmake project configuration
This repository does not currently include automated tests or a separate rules manual. The gameplay description is based on the source code available here.