Open Animiral opened 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
.
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.
struct PlayerObjects
in the screen moduleDemoFactory
in visualdemo*Test
classes'SetUp
functionsThese 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:
reset
, which initializes objects for the given number of players expected in the gameget_*
, yielding the appropriate object for the given player index