Exemplo n.º 1
0
        /// <summary>
        /// マインスイーパのビュー
        /// </summary>
        /// <param name="model"></param>
        public MineView(MineModel model)
        {
            _model = model;

            _mineTableCanvas     = new ConsoleCanvas(new Rectangle(1, 1, table.ColumnCount, table.RowCount));
            _mineTableInfoCanvas = new ConsoleCanvas(new Rectangle(table.ColumnCount + 10, 8, 10, table.RowCount));

            _conManager.AddCanvas(_mineTableCanvas);
            _conManager.AddCanvas(_mineTableInfoCanvas);
        }
Exemplo n.º 2
0
        static int Main(string[] args)
        {
            MineModel model = new MineModel();

            using (MineView view = new MineView(model))
            {
                MineController ctl      = new MineController(model);
                MineReceiver   receiver = new MineReceiver(ctl);
                do
                {
                    view.Draw();
                }while (receiver.Receive()); // 入力を受け取れる間はループする
            }

            return(0);
        }
Exemplo n.º 3
0
 /// <summary>
 /// コントローラ作成
 /// </summary>
 /// <param name="model"></param>
 public MineController(MineModel model)
 {
     _model = model;
 }