/// <summary> /// Standard-Konstruktor /// </summary> /// <param name="fo">Zeiger auf das Hauptfenster</param> public TDisplayFoMain(foMain fo, TSharedData data) { this._Form = fo; this._Segment = new TVisualMiniSegment(fo.paNext); fo.paNext.Paint += paNext_Paint; this._Data = data; this.reset(); }
/// <summary> /// Standard-Konstruktor /// </summary> public foMain() { InitializeComponent(); this.Data = new TSharedData(); this.Display = new TDisplayFoMain(this, this.Data); this.a = new TArena(this.Display, this.Data); this.Segment = new TVisualSegment(this.paTetris); this.Segment.registerArena(this.a); this.myArena = new TVisualArena(a, this.paTetris, this.Data, this.Segment); TSegmentBase.registerForm(this); }
/// <summary> /// Standard-Konstruktor /// </summary> /// <param name="a"></param> /// <param name="p"></param> public TVisualArena(TArena a, Panel p, TSharedData data, TVisualSegment segment) { this.myArena = a; this.myPanel = p; this._MeinSegment = segment; this.SpielfeldFarben = new Color[TArena.AnzahlSektoren, TArena.AnzahlSchichten]; this.myPanel.Paint += myPanel_Paint; initLabelPause(); this.myArena.registerArena(this); this._SharedData = data; }
/// <summary> /// Standard-Konstruktor /// </summary> /// <param name="display">Schnittstelle zur Anzeige</param> public TArena(TDisplay display, TSharedData data) { this._MyDisplay = display; this._SharedData = data; this.Spielfeld = new bool[AnzahlSektoren, AnzahlSchichten]; //Die innerste Schicht ist besetzt for (int i = 0; i < AnzahlSektoren; i++) { this.Spielfeld[i, 0] = true; } initTimer(); this._isPause = false; this._isRunning = true; }