コード例 #1
0
 public TetrisView()
 {
     InitializeComponent();
     ViewSetting();
     this.tm            = new TetrisModel(this);
     this.tc            = new TetrisController(this);
     finish_flag        = false;
     nowBlock           = null;
     nextBlock          = null;
     initialCubesOnShow = new System.Windows.Forms.PictureBox[12];
     initialCubesOnShow = GetWantedBlockOnShow();
     initialCubesOnNext = new System.Windows.Forms.PictureBox[12];
     initialCubesOnNext = GetWantedBlockOnNext();
     tc.start();
 }
コード例 #2
0
 // be inform the state is changed, then modify the model to new model
 public void stateHasChanged(TetrisModel model)
 {
     tm = model;
 }
コード例 #3
0
 public TetrisController(TetrisView tv)
 {
     this.tv = tv;
     this.tm = new TetrisModel(tv);
 }