Hra tetris v textovom mode

Delphi & Pascal (česká wiki)
Přejít na: navigace, hledání
Kategórie: KMP (Programy mladých programátorů)

Autor: Werbhofen
Program: Tetris.pasKniznica.pasTetrunit.pasTetrdata.pas
Soubor exe: Tetris.exe

Hra tetris v textovom mode.
{ TETRUNIT.PAS                                                      }
{ Kniznica pre tetris.                                              }
{                                                                   }
{ Author: WERBHOFEN                                                 }
{ Datum: 12.10.2009                            http://www.trsek.com }
 
UNIT TetrUnit;
 
INTERFACE
 
TYPE Pole4x4=array[1..4,1..4]of byte;
     Pole4x4x4=array[1..4]of Pole4x4;
 
CONST ZL:Pole4x4x4=
         (((1,1,0,0),
           (0,1,1,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (1,1,0,0),
           (1,0,0,0),
           (0,0,0,0)),
 
          ((1,1,0,0),
           (0,1,1,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (1,1,0,0),
           (1,0,0,0),
           (0,0,0,0)));
 
      ZP:Pole4x4x4=
         (((0,1,1,0),
           (1,1,0,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((1,0,0,0),
           (1,1,0,0),
           (0,1,0,0),
           (0,0,0,0)),
 
          ((0,1,1,0),
           (1,1,0,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((1,0,0,0),
           (1,1,0,0),
           (0,1,0,0),
           (0,0,0,0)));
 
       I:Pole4x4x4=
         (((0,0,0,0),
           (1,1,1,1),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (0,1,0,0),
           (0,1,0,0),
           (0,1,0,0)),
 
          ((0,0,0,0),
           (1,1,1,1),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (0,1,0,0),
           (0,1,0,0),
           (0,1,0,0)));
 
       O:Pole4x4x4=
         (((0,0,0,0),
           (0,1,1,0),
           (0,1,1,0),
           (0,0,0,0)),
 
          ((0,0,0,0),
           (0,1,1,0),
           (0,1,1,0),
           (0,0,0,0)),
 
          ((0,0,0,0),
           (0,1,1,0),
           (0,1,1,0),
           (0,0,0,0)),
 
          ((0,0,0,0),
           (0,1,1,0),
           (0,1,1,0),
           (0,0,0,0)));
 
      LP:Pole4x4x4=
         (((0,0,1,0),
           (1,1,1,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (0,1,0,0),
           (0,1,1,0),
           (0,0,0,0)),
 
          ((1,1,1,0),
           (1,0,0,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((1,1,0,0),
           (0,1,0,0),
           (0,1,0,0),
           (0,0,0,0)));
 
      LL:Pole4x4x4=
         (((0,0,0,0),
           (1,1,1,0),
           (0,0,1,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (0,1,0,0),
           (1,1,0,0),
           (0,0,0,0)),
 
          ((1,0,0,0),
           (1,1,1,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,1,1,0),
           (0,1,0,0),
           (0,1,0,0),
           (0,0,0,0)));
 
       T:Pole4x4x4=
         (((1,1,1,0),
           (0,1,0,0),
           (0,0,0,0),
           (0,0,0,0)),
 
          ((0,0,1,0),
           (0,1,1,0),
           (0,0,1,0),
           (0,0,0,0)),
 
          ((0,0,0,0),
           (0,1,0,0),
           (1,1,1,0),
           (0,0,0,0)),
 
          ((1,0,0,0),
           (1,1,0,0),
           (1,0,0,0),
           (0,0,0,0)));
 
       X:Pole4x4x4=
         (((0,1,0,0),
           (1,1,1,0),
           (0,1,0,0),
           (0,0,0,0)),
 
          ((1,0,1,0),
           (0,1,0,0),
           (1,0,1,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (1,1,1,0),
           (0,1,0,0),
           (0,0,0,0)),
 
          ((1,0,1,0),
           (0,1,0,0),
           (1,0,1,0),
           (0,0,0,0)));
 
       Y:Pole4x4x4=
         (((1,0,1,0),
           (0,1,0,0),
           (0,1,0,0),
           (0,0,0,0)),
 
          ((0,0,1,0),
           (1,1,0,0),
           (0,0,1,0),
           (0,0,0,0)),
 
          ((0,1,0,0),
           (0,1,0,0),
           (1,0,1,0),
           (0,0,0,0)),
 
          ((1,0,0,0),
           (0,1,1,0),
           (1,0,0,0),
           (0,0,0,0)));
 
       H:Pole4x4x4=
         (((1,0,1,0),
           (1,1,1,0),
           (1,0,1,0),
           (0,0,0,0)),
 
          ((1,1,1,0),
           (0,1,0,0),
           (1,1,1,0),
           (0,0,0,0)),
 
          ((1,0,1,0),
           (1,1,1,0),
           (1,0,1,0),
           (0,0,0,0)),
 
          ((1,1,1,0),
           (0,1,0,0),
           (1,1,1,0),
           (0,0,0,0)));
 
IMPLEMENTATION
 
END.