Animiral / shitbrix

A block-aligning game of our own, with blackjack and hookers
GNU General Public License v3.0
0 stars 0 forks source link

GameContext for IoC and DI #67

Open Animiral opened 6 years ago

Animiral commented 6 years ago

There are currently multiple ways to instantiate (one or several sets of) player objects, i.e. the objects that manage one player's stage (pit, cursor etc.) and logic.

These methods overlap functionally with class StageBuilder.

In this issue, unify all creation methods behind one interface with minimal dependencies, probably called Repository.

It might feature the functions:

Animiral commented 6 years ago

There will not be an “object repository”, but the original aim of this issue will be served by the introduction of a class GameContext, like the GlobalContext recently introduced. It will hold the objects that are necessary to run a game round, like the GameState, Journal and Client.