private void MakeRootAgents() { BoardAgent = _agents.Get <IBoardAgent>(); ArbiterAgent = _agents.Get <IArbiterAgent>(); WhitePlayerAgent = _agents.Get <IPlayerAgent>(_whitePlayerModel); BlackPlayerAgent = _agents.Get <IPlayerAgent>(_blackPlayerModel); }
private void CreateAgents() { _agents = new AgentRegistry(); _agents.Bind <IBoardAgent, BoardAgent>(new BoardAgent(_boardModel)); _agents.Bind <IArbiterAgent, ArbiterAgent>(new ArbiterAgent(_arbiterModel)); _agents.Bind <IEndTurnButtonAgent, EndTurnButtonAgent>(); _agents.Bind <ICardAgent, CardAgent>(); _agents.Bind <IDeckAgent, DeckAgent>(); _agents.Bind <IHandAgent, HandAgent>(); _agents.Bind <IPieceAgent, PieceAgent>(); _agents.Bind <IPlayerAgent, PlayerAgent>(); _agents.Resolve(); BoardAgent = _agents.New <IBoardAgent>(); ArbiterAgent = _agents.New <IArbiterAgent>(); WhitePlayerAgent = _agents.New <IPlayerAgent>(_whitePlayerModel); BlackPlayerAgent = _agents.New <IPlayerAgent>(_blackPlayerModel); }