Exemplo n.º 1
0
 /// <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();
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
        /// <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;
        }