PPS-24-Briscala

Detailed Design

DSL

The DSL uses a Builder pattern to generate a FullEngineModel. Specifically, GameDSL understands the instructions given in input and uses them accordingly to enrich an internal GameBuilder, which will then produce the model used during gameplay. To make the DSL syntax more intuitive and fluent, GameDSL uses SyntacticSugar to define certain fixed keywords and SyntacticSugarBuilder to handle longer and more complex instructions.

DSL_metamodel

Engine

The engine is structured around the Model-View-Controller (MVC) pattern, which separates the application into three interconnected components.

ControllerView_metamodel

EngineModel_metamodel

FullEngineModel only has methods to change the game state, which is represented by GameContext

GameLogics_metamodel

Previous Chapter Index Next Chapter