コード例 #1
0
    public GameBoardController(IGameBoardView view, IGameBoardModel model)
    {
        this.model = model;

        // Initialize View
        this.view = view;
        view.Init(model.Rows, model.Cols);
        view.Refresh(model);
    }
コード例 #2
0
    public void Refresh(IGameBoardModel model)
    {
        int rows = model.Rows;
        int cols = model.Cols;

        for (int row = 0; row < rows; ++row)
        {
            for (int col = 0; col < cols; ++col)
            {
                this.RefreshTile(row, col, model[row, col]);
            }
        }
    }
コード例 #3
0
 public MultiPlayerGameBoardPresenter(IMultiPlayerGameBoardView view, IGameBoardModel model)
 {
     this.view  = view;
     this.model = model;
     this.SetUp();
 }
コード例 #4
0
 public MultiPlayerGameBoardPresenter(IMultiPlayerGameBoardView view, IGameBoardModel model)
 {
     this.view = view;
     this.model = model;
     this.SetUp();
 }