Esempio n. 1
0
 public FormsGameView()
 {
     initalizePlayerToCommand();
     registerCommands();
     InitializeComponent();
     initializeBoardComponent();
     initializeActionControllers();
     r_BoardController = new BoardController(m_BoardView);
     r_BoardController.setEventListener(this);
     r_StateController = new StateController(m_StateBar);
     r_StatusController = new StatusController(m_StatusView);
     r_StatisticsController = new StatisticsController(new FormsStatisticsView());
     CommandCommander.GetInstance().GetCommand(eCommandType.SaveGame).Enabled = false;
 }
Esempio n. 2
0
 public void setUp()
 {
     m_PossibleMoves = new List<Point> {new Point(2, 3)};
     m_BoardView = new StubBoardView();
     m_MockModel = new DynamicMock(typeof (IBoardModel));
     m_BoardController = new BoardController(m_BoardView);
     m_MockModel.SetReturnValue("GetPossibleMovesFor", m_PossibleMoves);
     m_MockModel.SetReturnValue("GetBoard", r_ExpectedData);
     m_MockModel.SetReturnValue("GetCurrentColor", eCoinType.Black);
     m_EventListener = new DynamicMock(typeof (IBoardEventListener));
     m_BoardController.setEventListener((IBoardEventListener)m_EventListener.MockInstance);
     m_BoardController.SetModel((IBoardModel)m_MockModel.MockInstance);
     m_BoardController.setPlayers(new StubPlayer(), new StubPlayer());
 }